]> git.eshelyaron.com Git - emacs.git/commitdiff
(read_key_sequence): Explicitly avoid keybuf[-1].
authorRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 2006 01:25:52 +0000 (01:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 2006 01:25:52 +0000 (01:25 +0000)
src/ChangeLog
src/keyboard.c

index a4251651bda0f5c0a40c8fe040b65b7cb484fa74..71b7dde96b04da5ecb4c85c15917fb8c718b033e 100644 (file)
@@ -5,6 +5,8 @@
 
 2006-04-12  Richard Stallman  <rms@gnu.org>
 
+       * keyboard.c (read_key_sequence): Explicitly avoid keybuf[-1].
+
        * process.c (conv_lisp_to_sockaddr): If FAMILY unknown, just return.
        (Fprocess_send_eof): Abort if fail to open null device.
 
index 60ad54eac7e5c7143c200c5300263f6df33319a0..1aca0127763ff1a8c8957fbf15ad0ec1051b85b9 100644 (file)
@@ -1418,7 +1418,7 @@ command_loop_1 ()
   Lisp_Object keybuf[30];
   int i;
   int no_direct;
-  int prev_modiff;
+  int prev_modiff = 0;
   struct buffer *prev_buffer = NULL;
 #ifdef MULTI_KBOARD
   int was_locked = single_kboard;
@@ -9479,6 +9479,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
   /* Don't downcase the last character if the caller says don't.
      Don't downcase it if the result is undefined, either.  */
   if ((dont_downcase_last || first_binding >= nmaps)
+      && t > 0
       && t - 1 == original_uppercase_position)
     keybuf[t - 1] = original_uppercase;