diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-07-13 09:30:21 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-07-13 09:30:21 +0000 |
commit | ea9dd0918aad62a102f3493b05dd16b965c2bb8b (patch) | |
tree | 752c746fa24fe59c19d786161d6c5c05c41784fe /src/xdisp.c | |
parent | 176c92e68fcb0d692cb085f641d0fd6a3833c4ab (diff) | |
download | emacs-ea9dd0918aad62a102f3493b05dd16b965c2bb8b.tar.gz emacs-ea9dd0918aad62a102f3493b05dd16b965c2bb8b.tar.bz2 emacs-ea9dd0918aad62a102f3493b05dd16b965c2bb8b.zip |
(get_next_display_element): Use CHAR_STRING_NO_SIGNAL
instead of CHAR_STRING which can signal an error.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index fb148ee8200..ba9e08dba49 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4227,7 +4227,22 @@ get_next_display_element (it) 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++) { |