summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-10 12:16:45 -0600
committerKarl Williamson <public@khwilliamson.com>2012-08-11 19:32:31 -0600
commit2111a35c733ad351fd039ae6ebb7df6cb0a55c94 (patch)
tree2c65f79fe4cb5dd53205ccaa2a24204387d8923b /regcomp.c
parent6012a526f12c2cd0214843a2ed38eede87c28d58 (diff)
downloadperl-2111a35c733ad351fd039ae6ebb7df6cb0a55c94.tar.gz
regcomp.c: Make sure counter same in passes 1 and 2
The number of elements was not being incremented in pass 1, whereas that number is needed later on in pass 1. This did not cause a bug, as currently, in pass 1 we care only if the count is 1 or not, and this occurred only in a case where it would get incremented properly to more than 1 anyway. But this is a potential bug that should be squelched before it happens.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index e39d5f977e..c5964a0b35 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -12010,8 +12010,8 @@ parseit:
}
if (!SIZE_ONLY) {
cp_list = add_cp_to_invlist(cp_list, '-');
- element_count++;
}
+ element_count++;
} else
range = 1; /* yeah, it's a range! */
continue; /* but do it the next time */