From: Victor Wagner Date: Tue, 17 Oct 2006 18:21:53 +0000 (+0000) Subject: Fix bug #2 - process some escape sequences properly, when skipping X-Git-Tag: REL_0_95~20 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=55753d9009e926684aa021762c87de1fdc869fb0;p=oss%2Fcatdoc.git Fix bug #2 - process some escape sequences properly, when skipping alternates to unicode characters --- diff --git a/src/rtfread.c b/src/rtfread.c index 8ed1be6..9cb869b 100644 --- a/src/rtfread.c +++ b/src/rtfread.c @@ -261,8 +261,23 @@ int parse_rtf(FILE *f) { if (data_skip_mode == 0) add_to_buffer(&bufptr,com.numarg); i=groups[group_count].uc; - while((--i)>0) - fgetc(f); + while((--i)>0) { + int c=fgetc(f); + if (c == '\\') { + c = fgetc(f); + switch (c) { + case '\\': break; + case '\'': + /* skip two hex digits */ + fgetc(f); + fgetc(f); + break; + default: + break; + } + } + } + break; case RTF_PARA: /*if (para_mode > 0) {*/