diff options
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 5 |
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; |