From: Andy Heninger Date: Fri, 12 Apr 2019 20:34:27 +0000 (-0700) Subject: ICU-20544 Regex, Fix assertion failure in positive look-behind X-Git-Tag: release-65-rc~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdb1806580702f05d7bac627f367c12d45183796;p=icu ICU-20544 Regex, Fix assertion failure in positive look-behind --- diff --git a/icu4c/source/i18n/regexcmp.cpp b/icu4c/source/i18n/regexcmp.cpp index dcd754d785f..e27c3ca597f 100644 --- a/icu4c/source/i18n/regexcmp.cpp +++ b/icu4c/source/i18n/regexcmp.cpp @@ -2285,7 +2285,7 @@ void RegexCompile::handleCloseParen() { error(U_REGEX_LOOK_BEHIND_LIMIT); break; } - if (minML == INT32_MAX && maxML == 0) { + if (minML == INT32_MAX) { // This condition happens when no match is possible, such as with a // [set] expression containing no elements. // In principle, the generated code to evaluate the expression could be deleted, diff --git a/icu4c/source/test/testdata/regextst.txt b/icu4c/source/test/testdata/regextst.txt index 552f067af2e..677f4822177 100644 --- a/icu4c/source/test/testdata/regextst.txt +++ b/icu4c/source/test/testdata/regextst.txt @@ -1444,11 +1444,11 @@ "(?abc" # note: first 'ⰿ' is \u2c3f, hence empty set. "(?abc" +"(?<=[^[^]]†)" "abc" # Problem also exists w positive look-behind # Random debugging, Temporary # - # # Regexps from http://www.regexlib.com #