From 6b93d7644a7238ec8733339ee8aa8094c61f650e Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 2 Aug 2018 23:31:17 +0200 Subject: [PATCH] Proper constant definition for unicode error. --- m-string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m-string.h b/m-string.h index 84ad0f42..d6ad1b3a 100644 --- a/m-string.h +++ b/m-string.h @@ -981,6 +981,7 @@ typedef enum { } stringi_utf8_state_e; typedef unsigned int string_unicode_t; +#define STRING_UNICODE_ERROR (-1U) /* UTF8 character classification: * @@ -1118,7 +1119,7 @@ string_end_p (string_it_t it) str++; } while (state != STRINGI_UTF8_STARTING && state != STRINGI_UTF8_ERROR && *str != 0); it->next_ptr = str; - it->u = M_UNLIKELY (state == STRINGI_UTF8_ERROR) ? -1U : u; + it->u = M_UNLIKELY (state == STRINGI_UTF8_ERROR) ? STRING_UNICODE_ERROR : u; return false; }