summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-06-20 20:44:49 -0600
committerKarl Williamson <khw@cpan.org>2022-06-20 21:22:19 -0600
commit5da55c47184ab936397150bf2c6674c7cf4f88d1 (patch)
tree81bfb266a4646c36fcd5a3caf84e35b1a56b99a1 /inline.h
parent83a43a3dfcd8cab94a4264980ef19af004da1c28 (diff)
downloadperl-5da55c47184ab936397150bf2c6674c7cf4f88d1.tar.gz
PERL_IS_UTF8_CHAR_DFA: Ensure params evaluated once
Diffstat (limited to 'inline.h')
-rw-r--r--inline.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/inline.h b/inline.h
index 212e42aa59..90dcf87e9d 100644
--- a/inline.h
+++ b/inline.h
@@ -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; \