summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-12-18 13:27:06 -0700
committerKarl Williamson <public@khwilliamson.com>2011-12-23 08:35:59 -0700
commitbc417572dc9080f3602a3cf498141ff3e70b44ed (patch)
tree9c786b54cbe71e4983c5e2b7c4eedf655bb7ec24
parent39be665482910c9448d2b8abd039492f9193efed (diff)
downloadperl-bc417572dc9080f3602a3cf498141ff3e70b44ed.tar.gz
regcomp.c: Don't print incorrect debug info
The break out of the loop should be done before the debug statements that indicate the things that happen only if the break isn't done.
-rw-r--r--regcomp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 56b2b9c8e7..6cc680b1da 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2554,12 +2554,13 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags
else if (stringok) {
const unsigned int oldl = STR_LEN(scan);
regnode * const nnext = regnext(n);
+
+ if (oldl + STR_LEN(n) > U8_MAX)
+ break;
DEBUG_PEEP("merg",n,depth);
-
merged++;
- if (oldl + STR_LEN(n) > U8_MAX)
- break;
+
NEXT_OFF(scan) += NEXT_OFF(n);
STR_LEN(scan) += STR_LEN(n);
next = n + NODE_SZ_STR(n);