# HG changeset patch # User Gerd Moellmann # Date 991145367 0 # Node ID fdd419d4776a2e8974ebe0eb6469b7acefbbc433 # Parent 80a1968ca8131c8e97c6c9cf5ef82bae2825e167 (Fsingle_key_description): NUL-terminate the string buffer before calling build_string. diff -r 80a1968ca813 -r fdd419d4776a src/keymap.c --- a/src/keymap.c Tue May 29 13:57:30 2001 +0000 +++ b/src/keymap.c Tue May 29 14:09:27 2001 +0000 @@ -1967,7 +1967,10 @@ 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;