ICU-4034 off-by-one error in regexp 8 bit sets
X-SVN-Rev: 16098
This commit is contained in:
parent
5be502279b
commit
711cae9988
@ -326,7 +326,7 @@ inline void Regex8BitSet::add(UChar32 c) {
|
||||
|
||||
inline void Regex8BitSet::init(const UnicodeSet *s) {
|
||||
if (s != NULL) {
|
||||
for (int i=0; i<255; i++) {
|
||||
for (int i=0; i<=255; i++) {
|
||||
if (s->contains(i)) {
|
||||
this->add(i);
|
||||
}
|
||||
|
11
icu4c/source/test/testdata/regextst.txt
vendored
11
icu4c/source/test/testdata/regextst.txt
vendored
@ -389,6 +389,17 @@
|
||||
#
|
||||
"(.*?) *$" "<0><1>test</1> </0>"
|
||||
|
||||
#
|
||||
# Bug 4034
|
||||
#
|
||||
"\D" "<0>A</0>BC\u00ffDEF"
|
||||
"\d" "ABC\u00ffDEF"
|
||||
"\D" "<0>\u00ff</0>DEF"
|
||||
"\d" "\u00ffDEF"
|
||||
"\D" "123<0>\u00ff</0>DEF"
|
||||
"\D" "<0>\u0100</0>DEF"
|
||||
"\D" "123<0>\u0100</0>DEF"
|
||||
|
||||
#
|
||||
# Random debugging, Temporary
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user