--- psiconv/trunk/lib/psiconv/parse_word.c 2000/12/22 22:31:50 71 +++ psiconv/trunk/lib/psiconv/parse_word.c 2002/01/29 18:38:38 142 @@ -25,6 +25,10 @@ #include "parse_routines.h" #include "error.h" +#ifdef DMALLOC +#include +#endif + int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_word_status_section *result) @@ -139,11 +143,11 @@ len += 0x04; psiconv_progress(lev+2,off+len,"Going to read display size"); - (*result)->cursor_position = psiconv_read_u32(buf,lev+2,off + len,&res); + (*result)->display_size = psiconv_read_u32(buf,lev+2,off + len,&res); if (res) goto ERROR2; psiconv_debug(lev+2,off+len,"Display size: %08x", - (*result)->cursor_position); + (*result)->display_size); len += 0x04; if (length) @@ -325,6 +329,20 @@ len += leng; } + psiconv_progress(lev+2,off+len,"Reading trailing bytes"); + for (i = 0; i < psiconv_list_length((*result)->styles); i++) { + temp = psiconv_read_u8(buf,lev+3,off+len,&res); + if (res) + goto ERROR4; + if (temp != 0xff) { + psiconv_warn(lev+3,off+len,"Unknown trailing style byte"); + psiconv_debug(lev+3,off+len,"Trailing byte: %02x expected, read %02x", + 0xff,temp); + } else + psiconv_debug(lev+3,off+len,"Read trailing byte 0xff"); + len++; + } + if (length) *length = len;