From: Chris Allegretta Date: Mon, 14 Jan 2002 03:37:31 +0000 (+0000) Subject: - search.c:findnextstr() - Fix off by one in check for wrap around (Rocco Corsi) X-Git-Tag: v1.0.8~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0bc46a58dd9b35f9f7d1b6f27f004d0da153fd3c;p=nano.git - 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 --- 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;