aboutsummaryrefslogtreecommitdiff
path: root/key-string.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-05-20 10:01:19 +0100
committerThomas Adam <thomas@xteddy.org>2020-05-20 10:01:19 +0100
commit5ac5cd995e3f3c3914c9d069f4bfc643ee3f78c0 (patch)
treef5923c958035cec3ba5057a7e5f5c8833a99c704 /key-string.c
parentfa835339fdc9a5647cd90549840029c480edbf90 (diff)
parent6bde1c183766d0637633c1460cf6b17b57bc0280 (diff)
downloadrtmux-5ac5cd995e3f3c3914c9d069f4bfc643ee3f78c0.tar.gz
rtmux-5ac5cd995e3f3c3914c9d069f4bfc643ee3f78c0.tar.bz2
rtmux-5ac5cd995e3f3c3914c9d069f4bfc643ee3f78c0.zip
Merge branch 'obsd-master'
Diffstat (limited to 'key-string.c')
-rw-r--r--key-string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/key-string.c b/key-string.c
index 79f80554..1efb6e0b 100644
--- a/key-string.c
+++ b/key-string.c
@@ -339,7 +339,7 @@ key_string_lookup_key(key_code key, int with_flags)
/* Try the key against the string table. */
for (i = 0; i < nitems(key_string_table); i++) {
- if (key == key_string_table[i].key)
+ if (key == (key_string_table[i].key & KEYC_MASK_KEY))
break;
}
if (i != nitems(key_string_table)) {
@@ -359,7 +359,7 @@ key_string_lookup_key(key_code key, int with_flags)
/* Invalid keys are errors. */
if (key > 255) {
- snprintf(out, sizeof out, "Invalid#%llx", key);
+ snprintf(out, sizeof out, "Invalid#%llx", saved);
goto out;
}