changeset 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 585153d15846
children 622f11443e46
files src/keyboard.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;