diff options
| author | Gerd Moellmann | 2001-05-29 14:09:54 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-05-29 14:09:54 +0000 |
| commit | e15e282807fd5d0e96f6d49099d2b6a20e6ab30d (patch) | |
| tree | 5317f2bbea61a587cb114a32892f0f362c958c92 /src/keymap.c | |
| parent | 7bdba03c119b57522ed4246ab1586a7c6bc3ff66 (diff) | |
| download | emacs-e15e282807fd5d0e96f6d49099d2b6a20e6ab30d.tar.gz emacs-e15e282807fd5d0e96f6d49099d2b6a20e6ab30d.zip | |
(Fsingle_key_description): NUL-terminate the string
buffer before calling build_string.
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.") | |||
| 1967 | nbytes = end - tem; | 1967 | nbytes = end - tem; |
| 1968 | nchars = multibyte_chars_in_text (tem, nbytes); | 1968 | nchars = multibyte_chars_in_text (tem, nbytes); |
| 1969 | if (nchars == nbytes) | 1969 | if (nchars == nbytes) |
| 1970 | string = build_string (tem); | 1970 | { |
| 1971 | *end = '\0'; | ||
| 1972 | string = build_string (tem); | ||
| 1973 | } | ||
| 1971 | else | 1974 | else |
| 1972 | string = make_multibyte_string (tem, nchars, nbytes); | 1975 | string = make_multibyte_string (tem, nchars, nbytes); |
| 1973 | return string; | 1976 | return string; |