X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpng.c;h=17381514f46cd9876043a221cb2a579203d990e8;hp=d71c19bc05c542be31b00f65f72450f4f079e3d8;hb=2391d7ae5d8a145a250a8b80ab8c93ba74eba030;hpb=08aec55c59be9ddc638a655266edb5155ec42b73 diff --git a/lib/png.c b/lib/png.c index d71c19b..1738151 100644 --- a/lib/png.c +++ b/lib/png.c @@ -122,7 +122,7 @@ static int png_read_header(FILE*fi, struct png_header*header) return 0; } if(a!=8 && (b==2 || b==6)) { - printf("Bpp %d in mode %d not supported!\n", a); + printf("Bpp %d in mode %d not supported!\n", b, a); return 0; } if(c!=0) { @@ -486,6 +486,7 @@ EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char } if(!png_read_header(fi, &header)) { + fclose(fi); return 0; }