From 0bc46a58dd9b35f9f7d1b6f27f004d0da153fd3c Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Mon, 14 Jan 2002 03:37:31 +0000 Subject: [PATCH] - search.c:findnextstr() - Fix off by one in check for wrap around (Rocco Corsi) git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@1003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ search.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b89f398..f47089cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ CVS Code - do_suspend() - Call tcsetattr() to restore the old terminal settings, so tcsh can use ^C after suspend for example (fixes BUG #68). +- search.c: + findnextstr() + - Fix off by one in check for wrap around (Rocco Corsi). - winio.c: edit_refresh() - Rename lines to nlines to fix AIX breakage (reported by diff --git a/search.c b/search.c index e86a9d47..83677b7d 100644 --- a/search.c +++ b/search.c @@ -285,7 +285,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx, current_x_find++; /* Ensure we haven't wrapped around again! */ - if ((search_last_line) && (current_x_find >= beginx)) { + if ((search_last_line) && (current_x_find > beginx)) { if (!quiet) not_found_msg(needle); return NULL; -- 2.39.5