summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2014-10-19 22:48:14 +0200
committerYves Orton <demerphq@gmail.com>2014-10-20 00:34:18 +0200
commit64e04a51361b45dbbb94b038a93c7dc3cca0c7f9 (patch)
treed7ab9c2134896cf985e95e76464331ad0ba30999
parentfdfb4f2197409a1d793ee71f18be6e702a5461df (diff)
downloadperl-64e04a51361b45dbbb94b038a93c7dc3cca0c7f9.tar.gz
regcomp.c: study_chunk(): Reset the entire data struct, not just a bit of it.
-rw-r--r--regcomp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/regcomp.c b/regcomp.c
index 0d065e07f7..e8c3e69ad7 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3754,9 +3754,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
PERL_ARGS_ASSERT_STUDY_CHUNK;
-#ifdef DEBUGGING
- StructCopy(&zero_scan_data, &data_fake, scan_data_t);
-#endif
+
if ( depth == 0 ) {
while (first_non_open && OP(first_non_open) == OPEN)
first_non_open=regnext(first_non_open);
@@ -3880,7 +3878,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
DEBUG_PEEP("Branch", scan, depth);
num++;
- data_fake.flags = 0;
+ StructCopy(&zero_scan_data, &data_fake, scan_data_t);
if (data) {
data_fake.whilem_c = data->whilem_c;
data_fake.last_closep = data->last_closep;
@@ -5293,7 +5291,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVuf" RHS=%"UVuf"\n",
regnode_ssc intrnl;
int f = 0;
- data_fake.flags = 0;
+ StructCopy(&zero_scan_data, &data_fake, scan_data_t);
if (data) {
data_fake.whilem_c = data->whilem_c;
data_fake.last_closep = data->last_closep;
@@ -5537,7 +5535,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVuf" RHS=%"UVuf"\n",
SSize_t deltanext=0, minnext=0, f = 0, fake;
regnode_ssc this_class;
- data_fake.flags = 0;
+ StructCopy(&zero_scan_data, &data_fake, scan_data_t);
if (data) {
data_fake.whilem_c = data->whilem_c;
data_fake.last_closep = data->last_closep;