File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -3725,15 +3725,14 @@ PERL_STATIC_INLINE bool
37253725S_is_utf8_common (pTHX_ const U8 * const p , const U8 * const e ,
37263726 SV * const invlist )
37273727{
3728+ PERL_ARGS_ASSERT_IS_UTF8_COMMON ;
3729+
37283730 /* returns a boolean giving whether or not the UTF8-encoded character that
37293731 * starts at <p>, and extending no further than <e - 1> is in the inversion
37303732 * list <invlist>. */
37313733
3732- UV cp = utf8n_to_uvchr (p , e - p , NULL , 0 );
3733-
3734- PERL_ARGS_ASSERT_IS_UTF8_COMMON ;
3735-
3736- if (cp == 0 && (p >= e || * p != '\0' )) {
3734+ UV cp ;
3735+ if (! utf8_to_uv (p , e , & cp , NULL )) {
37373736 _force_out_malformed_utf8_message (p , e , 0 , MALFORMED_UTF8_DIE );
37383737 NOT_REACHED ; /* NOTREACHED */
37393738 }
You can’t perform that action at this time.
0 commit comments