]> git.wh0rd.org Git - nano.git/commitdiff
- search.c:findnextstr() - Fix off by one in check for wrap around (Rocco Corsi)
authorChris Allegretta <chrisa@asty.org>
Mon, 14 Jan 2002 03:31:10 +0000 (03:31 +0000)
committerChris Allegretta <chrisa@asty.org>
Mon, 14 Jan 2002 03:31:10 +0000 (03:31 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1002 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
search.c

index 056df949398a12874ae2c15172aafc3e8ae1e956..97d4ba832b85b1502935f3e77ccdf3b73edc2b81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,9 @@ CVS code -
   shorcut_init()
        - Replace hard coded ALT_G and ALT_H values in the replace
          and goto shortcuts with their macro counterparts NANO_ALT_*_KEY.      
+- 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
index 90962c25c89b0bdcece6fcb5faf51bdf939f3587..7afe28e58c1b0afb95f19afb7fa3052acc545657 100644 (file)
--- a/search.c
+++ b/search.c
@@ -305,7 +305,7 @@ filestruct *findnextstr(int quiet, int bracket_mode, filestruct * begin, int beg
        current_x_find = found - fileptr->data;
 #if 1
        /* 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;