summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2014-01-31 11:20:28 +0000
committernicm <nicm>2014-01-31 11:20:28 +0000
commit72d1be5ddd0dbc87f99d5430bb4ee4a295ea193b (patch)
tree88d8fb4ba8a15569a0e8a43deb1dcf76084d8955
parent1935eb5c1ea697762a142ca5353ade82d9a372a1 (diff)
Fix partial matches with xterm-keys on, from m0viefreak dot cm at
googlemail dot com.
-rw-r--r--xterm-keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xterm-keys.c b/xterm-keys.c
index 75eb6751..9b5a0a21 100644
--- a/xterm-keys.c
+++ b/xterm-keys.c
@@ -133,7 +133,7 @@ xterm_keys_match(const char *template, const char *buf, size_t len)
do {
if (*template != '_' && buf[pos] != *template)
return (-1);
- } while (pos++ != len && *++template != '\0');
+ } while (*++template != '\0' && ++pos != len);
if (*template != '\0') /* partial */
return (1);