--- psiconv/trunk/lib/psiconv/parse_image.c 2000/12/15 00:21:51 64 +++ psiconv/trunk/lib/psiconv/parse_image.c 2001/01/22 20:36:50 97 @@ -18,10 +18,12 @@ */ #include "config.h" +#include "compat.h" + #include -#include "data.h" #include "parse_routines.h" +#include "error.h" int psiconv_parse_jumptable_section(const psiconv_buffer buf,int lev, psiconv_u32 off, int *length, @@ -38,7 +40,7 @@ psiconv_progress(lev+2,off+len,"Going to read the list length"); listlen = psiconv_read_u32(buf,lev+2,off+len,&res); - if (!res) + if (res) goto ERROR2; psiconv_debug(lev+2,off+len,"List length: %08x",listlen); len += 4; @@ -46,7 +48,7 @@ psiconv_progress(lev+2,off+len,"Going to read the list"); for (i = 0; i < listlen; i++) { temp = psiconv_read_u32(buf,lev+2,off+len,&res); - if (!res) + if (res) goto ERROR2; if ((res = psiconv_list_add(*result,&temp))) goto ERROR2; @@ -75,7 +77,7 @@ } static int decode_byte(int lev, psiconv_u32 off, - psiconv_paint_data_section data, int *pixelnr, + psiconv_paint_data_section data, psiconv_u32 *pixelnr, psiconv_u8 byte, int bits_per_pixel, int linelen, int *linepos,int picsize) {