Skip to content

Commit 89b92b6

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 70324c6 commit 89b92b6

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
@@ -13102,8 +13102,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
1310213102
if (!veclen)
1310313103
goto done_valid_conversion;
1310413104
if (vec_utf8)
13105-
uv = utf8n_to_uvchr(vecstr, veclen, &ulen,
13106-
UTF8_ALLOW_ANYUV);
13105+
(void) utf8_to_uv(vecstr, vecstr + veclen, &uv, &ulen);
1310713106
else {
1310813107
uv = *vecstr;
1310913108
ulen = 1;

0 commit comments

Comments
 (0)