From 8c34f44daee8fbcc259525a97a0728f1798eed74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20P=C3=A9lissier?= Date: Sat, 14 Apr 2018 23:14:21 +0200 Subject: [PATCH] Finish fixing for 32 bits / clz --- m-string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-string.h b/m-string.h index 74aeac06..fa0a5038 100644 --- a/m-string.h +++ b/m-string.h @@ -861,7 +861,7 @@ typedef unsigned int string_unicode_t; static inline void stringi_utf8_decode(char c, stringi_utf8_state_e *state, string_unicode_t *unicode) { - const int type = m_core_clz((unsigned char)~c) - (sizeof(unsigned long) - 1) * CHAR_BIT; + const int type = m_core_clz((unsigned char)~c) - (sizeof(uint32_t) - 1) * CHAR_BIT; const string_unicode_t mask1 = -(string_unicode_t)(*state != STRINGI_UTF8_STARTING); const string_unicode_t mask2 = (0xFFU >> type); *unicode = ((*unicode << 6) & mask1) | (c & mask2);