# HG changeset patch # User Gerd Moellmann # Date 995016621 0 # Node ID 2f9707a444e4cf1c207a04d56124451e409ab9b3 # Parent 5b7951bd8471993c326259b273acf097cbe9d34c (get_next_display_element): Use CHAR_STRING_NO_SIGNAL instead of CHAR_STRING which can signal an error. diff -r 5b7951bd8471 -r 2f9707a444e4 src/xdisp.c --- a/src/xdisp.c Thu Jul 12 20:28:45 2001 +0000 +++ b/src/xdisp.c Fri Jul 13 09:30:21 2001 +0000 @@ -4227,7 +4227,22 @@ if (SINGLE_BYTE_CHAR_P (it->c)) str[0] = it->c, len = 1; else - len = CHAR_STRING (it->c, str); + { + len = CHAR_STRING_NO_SIGNAL (it->c, str); + if (len < 0) + { + /* It's an invalid character, which + shouldn't happen actually, but due to + bugs it may happen. Let's print the char + as is, there's not much meaningful we can + do with it. */ + str[0] = it->c; + str[1] = it->c >> 8; + str[2] = it->c >> 16; + str[3] = it->c >> 24; + len = 4; + } + } for (i = 0; i < len; i++) {