changeset 22237:566c88b62de6

(re_search_2): Don't use ++ inside RE_TRANSLATE. (re_match_2_internal): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Mon, 25 May 1998 20:14:54 +0000
parents bfaacbee089a
children fd2b7dede9cd
files src/regex.c
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Mon May 25 20:11:54 1998 +0000
+++ b/src/regex.c	Mon May 25 20:14:54 1998 +0000
@@ -3807,12 +3807,18 @@
 		  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 @@
 		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);
 	    }