Skip to content

Commit b532b9a

Browse files
committed
ext/mbstring: use unsigned char for variable with max value of 255
1 parent 840d800 commit b532b9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ static size_t mb_fast_strlen_utf8(unsigned char *p, size_t len)
17761776
const __m128i delta = _mm_set1_epi8(1);
17771777
__m128i counter = _mm_setzero_si128(); /* Vector of 16 continuation-byte counters */
17781778

1779-
int reset_counter = 255;
1779+
unsigned char reset_counter = 255;
17801780
do {
17811781
__m128i operand = _mm_loadu_si128((__m128i*)p); /* Load 16 bytes */
17821782
__m128i lt = _mm_cmplt_epi8(operand, threshold); /* Find all which are continuation bytes */

0 commit comments

Comments
 (0)