summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-03-17 16:48:18 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-03-17 16:48:18 +0000
commit8c335a22f55b34af803aab12e702e939e3b6d098 (patch)
tree6ba9130f0452e2fec747452e4956c49b90db3f8a /usr.bin/tmux
parent1d44875dd669cc043abe4daa100d74ead2589499 (diff)
Fix negative window index range check (> not <). Reported by Juan Pablo
in GitHub issue 1283.
Diffstat (limited to 'usr.bin/tmux')
-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;
}