]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous change.
authorKarl Heuer <kwzh@gnu.org>
Sun, 23 Feb 1997 22:49:18 +0000 (22:49 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sun, 23 Feb 1997 22:49:18 +0000 (22:49 +0000)
src/search.c

index f96e9e53bd91906de322bf65e2a85635679b44ad..d321ec1901e52b8f7abeb0717ff1b05ad46a2f3e 100644 (file)
@@ -848,10 +848,11 @@ skip_chars (forwardp, syntaxp, string, lim)
          {
            while (pos > XINT (lim))
              {
+               int savepos = pos;
                DEC_POS (pos);
                if (!fastmap[(int) SYNTAX (FETCH_CHAR (pos))])
                  {
-                   INC_POS (pos);
+                   pos = savepos;
                    break;
                  }
              }
@@ -889,6 +890,7 @@ skip_chars (forwardp, syntaxp, string, lim)
          {
            while (pos > XINT (lim))
              {
+               int savepos = pos;
                DEC_POS (pos);
                if (fastmap[(c = FETCH_BYTE (pos))])
                  {
@@ -903,14 +905,23 @@ skip_chars (forwardp, syntaxp, string, lim)
                          if (ch >= char_ranges[i] && ch <= char_ranges[i + 1])
                            break;
                        if (!(negate ^ (i < n_char_ranges)))
-                         break;
+                         {
+                           pos = savepos;
+                           break;
+                         }
                      }
                    else
                      if (!negate)
-                       break;
+                       {
+                         pos = savepos;
+                         break;
+                       }
                  }
                else
-                 break;
+                 {
+                   pos = savepos;
+                   break;
+                 }
              }
          }
       }