ICU-4034 off-by-one error in regexp 8 bit sets

X-SVN-Rev: 16098
This commit is contained in:
Andy Heninger 2004-08-03 05:22:12 +00:00
parent 5be502279b
commit 711cae9988
2 changed files with 12 additions and 1 deletions

View File

@ -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);
}

View File

@ -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
#