Skip to content

Commit e45ec1c

Browse files
committed
sv_vcatpvfn_flags: Use utf8_to_uv
This is a change in behavior for malformed input. Previously it warned and substituted 0; now it warns and substitutes the REPLACEMENT CHARACTER, which is the better choice.
1 parent 22496f1 commit e45ec1c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13090,8 +13090,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
1309013090
if (!veclen)
1309113091
goto done_valid_conversion;
1309213092
if (vec_utf8)
13093-
uv = utf8n_to_uvchr(vecstr, veclen, &ulen,
13094-
UTF8_ALLOW_ANYUV);
13093+
(void) utf8_to_uv(vecstr, vecstr + veclen, &uv, &ulen);
1309513094
else {
1309613095
uv = *vecstr;
1309713096
ulen = 1;

0 commit comments

Comments
 (0)