changeset 37938:fdd419d4776a

(Fsingle_key_description): NUL-terminate the string buffer before calling build_string.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 29 May 2001 14:09:27 +0000
parents 80a1968ca813
children ef06ff6aad4d
files src/keymap.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;