From e65abed8a9e969b0eb692378ce495d727c5447ec Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 30 Dec 2017 12:05:25 +0100 Subject: [PATCH] Fix issue with C++ --- m-string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m-string.h b/m-string.h index 5508af77..c65a06f7 100644 --- a/m-string.h +++ b/m-string.h @@ -853,7 +853,8 @@ static inline void stringi_utf8_decode(char c, stringi_utf8_state_e *state, 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); - *state = STRINGI_UTF8_STATE_TAB[*state * 8 + type]; + *state = M_ASSIGN_CAST(stringi_utf8_state_e, + STRINGI_UTF8_STATE_TAB[*state * 8 + type]); } /* Check if the given array of characters is a valid UTF8 stream */