summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-06-04 14:24:49 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-06-04 14:24:49 +0000
commit6c1f03578d7a616f96b04eccd5095d4f9463edb2 (patch)
tree2723f8fb2caa0027f7d28e9f78b50723b739c069 /input.c
parent8dd2f0da3f9fbb6a08aa1438c83e0c9a1b7f4565 (diff)
Oops, CAN and SUB should abort the sequence (return to first state), not remain
in the same state.
Diffstat (limited to 'input.c')
-rw-r--r--input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/input.c b/input.c
index 07e6db0b..f7980c25 100644
--- a/input.c
+++ b/input.c
@@ -400,6 +400,9 @@ input_state_sequence_first(u_char ch, struct input_ctx *ictx)
/* Abort sequence and begin with new. */
input_state(ictx, input_state_escape);
} else if (ch != 0x18 && ch != 0x1a) { /* CAN and SUB */
+ /* Abort sequence. */
+ input_state(ictx, input_state_first);
+ } else {
/* Handle C0 immediately. */
input_handle_c0_control(ch, ictx);
}
@@ -465,6 +468,9 @@ input_state_sequence_next(u_char ch, struct input_ctx *ictx)
/* Abort sequence and begin with new. */
input_state(ictx, input_state_escape);
} else if (ch != 0x18 && ch != 0x1a) { /* CAN and SUB */
+ /* Abort sequence. */
+ input_state(ictx, input_state_first);
+ } else {
/* Handle C0 immediately. */
input_handle_c0_control(ch, ictx);
}