From 6f39425d9242fa7af570309aef32cae510bfad44 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 7 Aug 2008 04:06:47 +0000 Subject: [PATCH] (decode_add_er_char): Fix problem when a character represented by an entity-reference is not defined. --- src/text-coding.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; } } -- 1.7.10.4