projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0658cdd
)
regcomp.c: Properly count elements in [] for false ranges
author
Karl Williamson
<public@khwilliamson.com>
Fri, 20 Jul 2012 17:35:07 +0000
(11:35 -0600)
committer
Karl Williamson
<public@khwilliamson.com>
Wed, 25 Jul 2012 03:13:49 +0000
(21:13 -0600)
When something that looks like a range turns out not to be, the hyphen
is matched literally, and so is a separate element in the character
class. It needs to be accounted as such.
regcomp.c
patch
|
blob
|
history
diff --git
a/regcomp.c
b/regcomp.c
index
8f48844
..
9c79400
100644
(file)
--- a/
regcomp.c
+++ b/
regcomp.c
@@
-11816,8
+11816,10
@@
parseit:
"False [] range \"%*.*s\"",
w, w, rangebegin);
}
- if (!SIZE_ONLY)
+ if (!SIZE_ONLY)
{
cp_list = add_cp_to_invlist(cp_list, '-');
+ element_count++;
+ }
} else
range = 1; /* yeah, it's a range! */
continue; /* but do it the next time */