Skip to content

Commit 81efe6b

Browse files
committed
tweak
1 parent ceb8443 commit 81efe6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/json/json_encoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,12 @@ zend_result php_json_escape_string(
586586

587587
int input_range_mask = _mm_movemask_epi8(input_range);
588588
if (input_range_mask != 0) {
589-
max_shift = zend_ulong_ntz(input_range_mask);
590-
if (UNEXPECTED(max_shift <= 1)) {
589+
if (UNEXPECTED(input_range_mask & 1)) {
591590
/* not worth it */
592591
us = (unsigned char)s[pos];
593592
goto fallback;
594593
}
594+
max_shift = zend_ulong_ntz(input_range_mask);
595595
}
596596

597597
#ifdef ZEND_INTRIN_SSE4_2_NATIVE

0 commit comments

Comments
 (0)