aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.c b/cmd2.c
index 83b3111..ee40ce5 100644
--- a/cmd2.c
+++ b/cmd2.c
@@ -1401,7 +1401,7 @@ void parse_rebind __P1 (char *,arg)
for (p = keydefs; p; p = p->next) {
if (p == *kp)
continue;
- if (seqlen == p->seqlen && !memcmp(p->sequence, seq, seqlen)) {
+ if (!memcmp(p->sequence, seq, MIN2(seqlen, p->seqlen))) {
show_single_bind("key already bound as:", p);
return;
}