IMG_pnm.c
changeset 367 b2aa197f6774
parent 347 ad5034cad524
child 368 8a61842d00ce
equal deleted inserted replaced
366:f58b3461c128 367:b2aa197f6774
   227 				row[i] = row[i] * 255 / maxval;
   227 				row[i] = row[i] * 255 / maxval;
   228 		}
   228 		}
   229 		row += surface->pitch;
   229 		row += surface->pitch;
   230 	}
   230 	}
   231 done:
   231 done:
   232 	free(buf);
   232 	SDL_free(buf);
   233 	if(error) {
   233 	if(error) {
   234 		SDL_RWseek(src, start, RW_SEEK_SET);
   234 		SDL_RWseek(src, start, RW_SEEK_SET);
   235 		if ( surface ) {
   235 		if ( surface ) {
   236 			SDL_FreeSurface(surface);
   236 			SDL_FreeSurface(surface);
   237 			surface = NULL;
   237 			surface = NULL;