--- psiconv/trunk/lib/psiconv/parse_page.c 2000/12/15 00:21:51 64 +++ psiconv/trunk/lib/psiconv/parse_page.c 2000/12/15 01:16:43 65 @@ -39,7 +39,7 @@ psiconv_progress(lev+2,off+len, "Going to read the first byte (0x01 expected)"); temp = psiconv_read_u8(buf,lev+2,off+len,&res); - if (!res) + if (res) goto ERROR2; if (temp != 0x01) { psiconv_warn(lev+2,off+len,"Page header first byte mismatch"); @@ -201,17 +201,18 @@ "Page dimensions marker: read %08x, expected %08x",temp, PSICONV_ID_PAGE_DIMENSIONS); } + len += 4; psiconv_progress(lev+2,off+len,"Going to read the page width"); (*result)->page_width = psiconv_read_length(buf,lev+2,off+len,&leng,&res); - if (!res) + if (res) goto ERROR4; psiconv_debug(lev+2,off+len,"Page width: %6.3f",(*result)->page_width); len += leng; psiconv_progress(lev+2,off+len,"Going to read the page height"); (*result)->page_height = psiconv_read_length(buf,lev+2,off+len,&leng,&res); - if (!res) + if (res) goto ERROR4; psiconv_debug(lev+2,off+len,"Page height: %6.3f",(*result)->page_height); len += leng;