diff src/keyboard.c @ 69985:d5629ae481f1

(read_key_sequence): Explicitly avoid keybuf[-1].
author Richard M. Stallman <rms@gnu.org>
date Thu, 13 Apr 2006 01:25:06 +0000
parents 7f48146dd4d2
children 85887be0a943 2d2f6f096f6e c156f6a9e7b5
line wrap: on
line diff
--- a/src/keyboard.c	Thu Apr 13 01:21:48 2006 +0000
+++ b/src/keyboard.c	Thu Apr 13 01:25:06 2006 +0000
@@ -1418,7 +1418,7 @@
   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 @@
   /* 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;