This commit just changes a test to look for UTF-8 invariants instead of
legal UTF-8 start characters. The effective difference is that now all
non-invariants go to the general utf8 handling function, which is
equipped to find malformed UTF-8. Previously, this code would
improperly accept malformations that were illegal start characters or
continuation characters.
/*FALLTHROUGH*/
default: /* A literal character */
normal_default:
- if (UTF8_IS_START(*p) && UTF) {
+ if (! UTF8_IS_INVARIANT(*p) && UTF) {
STRLEN numlen;
ender = utf8n_to_uvchr((U8*)p, RExC_end - p,
&numlen, UTF8_ALLOW_DEFAULT);