src/lib/png.c
changeset 84 9cc49917ebac
parent 70 35515b3a82b7
child 86 d4a62899587f
equal deleted inserted replaced
83:a1e8fa84a9fb 84:9cc49917ebac
   500     struct pt_png_img _img, *img = &_img;
   500     struct pt_png_img _img, *img = &_img;
   501     struct pt_tile_info *ti = &tile->info;
   501     struct pt_tile_info *ti = &tile->info;
   502     int err;
   502     int err;
   503 
   503 
   504     // init img
   504     // init img
   505     img->png = NULL;
   505     memset(img, 0, sizeof(*img));
   506     img->info = NULL;
       
   507 
   506 
   508     // check within bounds
   507     // check within bounds
   509     if (ti->x >= header->width || ti->y >= header->height)
   508     if (ti->x >= header->width || ti->y >= header->height)
   510         // completely outside
   509         // completely outside
   511         RETURN_ERROR(PT_ERR_TILE_CLIP);
   510         RETURN_ERROR(PT_ERR_TILE_CLIP);