regexec.c: Remove redundant calculation
authorKarl Williamson <public@khwilliamson.com>
Thu, 20 Dec 2012 23:14:05 +0000 (16:14 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sat, 22 Dec 2012 16:48:17 +0000 (09:48 -0700)
Commit 9a902117f5d8a3ebc669e3a90eeb7cee78286a33 introduced a redundancy.
It calculates a value twice.

regexec.c

index bb0c198..d91afe3 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -6762,7 +6762,7 @@ S_regrepeat(pTHX_ const regexp *prog, char **startposp, const regnode *p, I32 ma
                        && (scan_char_len = UTF8SKIP(scan)) <= STR_LEN(p)
                        && memEQ(scan, STRING(p), scan_char_len))
                 {
-                    scan += UTF8SKIP(scan);
+                    scan += scan_char_len;
                     hardcount++;
                 }
             }