Skip to content

Commit ace6c63

Browse files
committed
dump.c: Use valid_utf8_to_uv for known valid
We have a function that is designed for just this purpose where we know that the UTF-8 is valid.
1 parent 3bd2e0d commit ace6c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
233233

234234
for ( ; pv < end ; pv += readsize ) {
235235
const UV u = (isuni) /* Here known to be valid; checked just above */
236-
? utf8_to_uv_or_die((U8*)pv, (U8*) end, &readsize)
236+
? valid_utf8_to_uv( (U8*) pv, &readsize)
237237
: (U8) *pv;
238238
const U8 c = (U8)u;
239239
const char *source_buf = octbuf;

0 commit comments

Comments
 (0)