summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2018-03-17 16:48:17 +0000
committernicm <nicm@openbsd.org>2018-03-17 16:48:17 +0000
commitccbc1512f5f7a3ede7aad35909374aacab61bb3e (patch)
tree9799c8beb221d8b62d73e7f8101c92c6fb7b2451
parentsync (diff)
downloadwireguard-openbsd-ccbc1512f5f7a3ede7aad35909374aacab61bb3e.tar.xz
wireguard-openbsd-ccbc1512f5f7a3ede7aad35909374aacab61bb3e.zip
Fix negative window index range check (> not <). Reported by Juan Pablo
in GitHub issue 1283.
-rw-r--r--usr.bin/tmux/cmd-find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c
index b61340c2a50..02dbe85bc76 100644
--- a/usr.bin/tmux/cmd-find.c
+++ b/usr.bin/tmux/cmd-find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.59 2018/01/15 15:30:03 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.60 2018/03/17 16:48:17 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -390,7 +390,7 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
return (-1);
fs->idx = s->curw->idx + n;
} else {
- if (n < s->curw->idx)
+ if (n > s->curw->idx)
return (-1);
fs->idx = s->curw->idx - n;
}