summaryrefslogtreecommitdiff
path: root/src/keymap.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-05-29 14:09:54 +0000
committerGerd Moellmann <gerd@gnu.org>2001-05-29 14:09:54 +0000
commite15e282807fd5d0e96f6d49099d2b6a20e6ab30d (patch)
tree5317f2bbea61a587cb114a32892f0f362c958c92 /src/keymap.c
parent7bdba03c119b57522ed4246ab1586a7c6bc3ff66 (diff)
downloademacs-e15e282807fd5d0e96f6d49099d2b6a20e6ab30d.tar.gz
(Fsingle_key_description): NUL-terminate the string
buffer before calling build_string.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c
index f96c109c9cd..5da93ee89f0 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1967,7 +1967,10 @@ around function keys and event symbols.")
nbytes = end - tem;
nchars = multibyte_chars_in_text (tem, nbytes);
if (nchars == nbytes)
- string = build_string (tem);
+ {
+ *end = '\0';
+ string = build_string (tem);
+ }
else
string = make_multibyte_string (tem, nchars, nbytes);
return string;