diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-12-18 13:27:06 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-19 11:58:16 -0700 |
commit | b2230d39b7d1ffe8e06d9d4c2481e422dbd0adf3 (patch) | |
tree | f15793886262d32af81b02d593a12c6ca5a2f23c /regcomp.c | |
parent | a36afff11db8f21755c9de54a9d78c26806bd1f8 (diff) | |
download | perl-b2230d39b7d1ffe8e06d9d4c2481e422dbd0adf3.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.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |