summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index dff14877103..1ad852c819a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9684,6 +9684,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;