Fix bug introduced in recent UCP changes (writing outside starting code unit

bitmap for non-UTF caseless character U+00DF).
This commit is contained in:
Philip.Hazel 2020-02-25 16:47:36 +00:00
parent 3be538015b
commit 68f9c49517
3 changed files with 5 additions and 1 deletions

View File

@ -824,7 +824,7 @@ if (caseless)
(void)PRIV(ord2utf)(c, buff); (void)PRIV(ord2utf)(c, buff);
SET_BIT(buff[0]); SET_BIT(buff[0]);
} }
else SET_BIT(c); else if (c < 256) SET_BIT(c);
#else /* 16-bit or 32-bit mode */ #else /* 16-bit or 32-bit mode */
if (c > 0xff) SET_BIT(0xff); else SET_BIT(c); if (c > 0xff) SET_BIT(0xff); else SET_BIT(c);
#endif #endif

2
testdata/testinput5 vendored
View File

@ -2179,4 +2179,6 @@
/\p{Any}*xyz/I /\p{Any}*xyz/I
/(|ß)7/caseless,ucp
# End of testinput5 # End of testinput5

View File

@ -4938,4 +4938,6 @@ Overall options: anchored
Last code unit = 'z' Last code unit = 'z'
Subject length lower bound = 3 Subject length lower bound = 3
/(|ß)7/caseless,ucp
# End of testinput5 # End of testinput5