diff options
author | Karl Williamson <khw@cpan.org> | 2022-03-04 14:25:21 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-03-05 21:07:52 -0700 |
commit | d1e771d8c533168553df9b2a858d967f707fc9fe (patch) | |
tree | 6a974f66d191c5e804fb30c3091a0450b11ee8cf /inline.h | |
parent | 257221650c51b227ed92b0452562de2e9798565d (diff) | |
download | perl-d1e771d8c533168553df9b2a858d967f707fc9fe.tar.gz |
Fix utf8_to_uvchr for non-core calls
Commit a460925186154b270b7a647a4f30b2f01fd97c4b broke calling this and
related functions from outside of core Perl, but only when the input is
empty (which is an error anyway, so was not caught except for deliberate
API edge case tests in Devel::PPPort).
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2468,7 +2468,12 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s, * cases. */ /* No calls from core pass in an empty string; non-core need a check */ - PERL_NON_CORE_CHECK_EMPTY(s, send); +#ifdef PERL_CORE + assert(curlen > 0); +#else + if (curlen == 0) return _utf8n_to_uvchr_msgs_helper(s0, 0, retlen, + flags, errors, msgs); +#endif type = PL_strict_utf8_dfa_tab[*s]; |