diff options
-rw-r--r-- | regexec.c | 4 | ||||
-rw-r--r-- | t/re/script_run.t | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -10394,6 +10394,10 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target, S * another set has already been encountered. (The other digit ranges * in Common are not similarly blessed) */ if (UNLIKELY(isDIGIT(*s))) { + if (UNLIKELY(script_of_run == SCX_Unknown)) { + retval = FALSE; + break; + } if (zero_of_run > 0) { if (zero_of_run != '0') { retval = FALSE; diff --git a/t/re/script_run.t b/t/re/script_run.t index b892d757a7..a1b877efa1 100644 --- a/t/re/script_run.t +++ b/t/re/script_run.t @@ -62,6 +62,7 @@ like("\N{U+03A2}", $script_run, "A single unassigned code point is a script run" unlike("\N{U+03A2}\N{U+03A2}", $script_run, "But not more than one"); unlike("A\N{U+03A2}", $script_run, "... and not in combination with an assigned one"); unlike("\N{U+03A2}A", $script_run, "... in either order"); +unlike("\N{U+03A2}0", $script_run, "... nor with a digit following"); like("A\N{COMBINING GRAVE ACCENT}", $script_run, "An inherited script matches others"); like("\N{COMBINING GRAVE ACCENT}A", $script_run, "... even if first in the sequence"); |