diff options
author | Karl Williamson <khw@cpan.org> | 2022-06-20 20:44:49 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-06-20 21:22:19 -0600 |
commit | 5da55c47184ab936397150bf2c6674c7cf4f88d1 (patch) | |
tree | 81bfb266a4646c36fcd5a3caf84e35b1a56b99a1 | |
parent | 83a43a3dfcd8cab94a4264980ef19af004da1c28 (diff) | |
download | perl-5da55c47184ab936397150bf2c6674c7cf4f88d1.tar.gz |
PERL_IS_UTF8_CHAR_DFA: Ensure params evaluated once
-rw-r--r-- | inline.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1510,9 +1510,10 @@ Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el) incomplete_char_action) \ STMT_START { \ const U8 * s = s0; \ + const U8 * e_ = e; \ UV state = 0; \ \ - PERL_NON_CORE_CHECK_EMPTY(s,e); \ + PERL_NON_CORE_CHECK_EMPTY(s, e_); \ \ do { \ state = dfa_tab[256 + state + dfa_tab[*s]]; \ @@ -1525,7 +1526,7 @@ Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el) if (UNLIKELY(state == 1)) { /* Rejecting state */ \ reject_action; \ } \ - } while (s < e); \ + } while (s < e_); \ \ /* Here, dropped out of loop before end-of-char */ \ incomplete_char_action; \ |