From 8c335a22f55b34af803aab12e702e939e3b6d098 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 17 Mar 2018 16:48:18 +0000 Subject: Fix negative window index range check (> not <). Reported by Juan Pablo in GitHub issue 1283. --- usr.bin/tmux/cmd-find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux') 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 @@ -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; } -- cgit v1.2.3