From: tomo Date: Thu, 7 Aug 2008 04:06:47 +0000 (+0000) Subject: (decode_add_er_char): Fix problem when a character represented by an X-Git-Tag: r21-4-21-chise-0_24-=shinjigen^20~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6f39425d9242fa7af570309aef32cae510bfad44;p=chise%2Fxemacs-chise.git- (decode_add_er_char): Fix problem when a character represented by an entity-reference is not defined. --- diff --git a/src/text-coding.c b/src/text-coding.c index f22cf5a..b28c2d7 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -1,7 +1,7 @@ /* Code conversion functions. Copyright (C) 1991, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1999,2000,2001,2002,2003,2004,2005 MORIOKA Tomohiko + Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2008 MORIOKA Tomohiko This file is part of XEmacs. @@ -3346,7 +3346,14 @@ decode_add_er_char (struct decoding_stream *str, Emchar c, ? DECODE_CHAR (ccs, code, 0) : decode_builtin_char (ccs, code); - DECODE_ADD_UCS_CHAR (chr, dst); + if ( chr >= 0 ) + DECODE_ADD_UCS_CHAR (chr, dst); + else + { + Dynarr_add_many (dst, str->er_buf, str->er_counter); + Dynarr_add (dst, ';'); + } + goto decoded; } }