From 5da55c47184ab936397150bf2c6674c7cf4f88d1 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 20 Jun 2022 20:44:49 -0600 Subject: PERL_IS_UTF8_CHAR_DFA: Ensure params evaluated once --- inline.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inline.h') 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; \ -- cgit v1.2.1