]> git.eshelyaron.com Git - emacs.git/commitdiff
(re_search_2): Don't use ++ inside RE_TRANSLATE.
authorRichard M. Stallman <rms@gnu.org>
Mon, 25 May 1998 20:14:54 +0000 (20:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 25 May 1998 20:14:54 +0000 (20:14 +0000)
(re_match_2_internal): Likewise.

src/regex.c

index ed4cfc9d95ad171cb51d9410b98af5f02f5a1f29..a638e1734dd06b3a084ee38e92df1b7fbce845b0 100644 (file)
@@ -3807,12 +3807,18 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
                  else
                    while (range > lim
                           && !fastmap[(unsigned char)
-                                      RE_TRANSLATE (translate, (unsigned char) *d++)])
-                     range--;
+                                      RE_TRANSLATE (translate, (unsigned char) *d)])
+                     {
+                       d++;
+                       range--;
+                     }
                }
              else
-               while (range > lim && !fastmap[(unsigned char) *d++])
-                 range--;
+               while (range > lim && !fastmap[(unsigned char) *d])
+                 {
+                   d++;
+                   range--;
+                 }
 
              startpos += irange - range;
            }
@@ -4526,9 +4532,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
                do
                  {
                    PREFETCH ();
-                   if ((unsigned char) RE_TRANSLATE (translate, (unsigned char) *d++)
+                   if ((unsigned char) RE_TRANSLATE (translate, (unsigned char) *d)
                        != (unsigned char) *p++)
                      goto fail;
+                   d++;
                  }
                while (--mcnt);
            }