diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-01-31 11:20:29 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-01-31 11:20:29 +0000 |
commit | 8ed4baf9938b6d3f612fe2bbdc0fdedb18545645 (patch) | |
tree | 2c3387b7f94e98662de6fa46c56b42e96a483aed | |
parent | 5e015980dfaa4c828ecee13d2b87540dd3761afb (diff) |
Fix partial matches with xterm-keys on, from m0viefreak dot cm at
googlemail dot com.
-rw-r--r-- | usr.bin/tmux/xterm-keys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/xterm-keys.c b/usr.bin/tmux/xterm-keys.c index 87962c9a68c..2d6b601fb3d 100644 --- a/usr.bin/tmux/xterm-keys.c +++ b/usr.bin/tmux/xterm-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xterm-keys.c,v 1.11 2013/03/22 10:30:04 nicm Exp $ */ +/* $OpenBSD: xterm-keys.c,v 1.12 2014/01/31 11:20:28 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |