From 9700caefaeda5dae3d2cc6b19e756cd8fc2f4884 Mon Sep 17 00:00:00 2001 From: Vincent Herbet Date: Tue, 24 Jul 2018 15:45:50 +0200 Subject: [PATCH] Fix client_print_color where the color is ignored if string starts with an unicode character (#504) --- amxmodx/amxmodx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 396d9237..33b010d5 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -338,7 +338,7 @@ static cell AMX_NATIVE_CALL client_print_color(AMX *amx, cell *params) /* 3 para g_langMngr.SetDefLang(i); msg = format_amxstring(amx, params, 3, len); - if (*msg > 4) // Insert default color code at the start if not present, otherwise message will not be colored. + if (static_cast(*msg) > 4) // Insert default color code at the start if not present, otherwise message will not be colored. { memmove(msg + 1, msg, ke::Min(len++, 191)); *msg = 1; @@ -376,7 +376,7 @@ static cell AMX_NATIVE_CALL client_print_color(AMX *amx, cell *params) /* 3 para msg = format_amxstring(amx, params, 3, len); - if (*msg > 4) // Insert default color code at the start if not present, otherwise message will not be colored. + if (static_cast(*msg) > 4) // Insert default color code at the start if not present, otherwise message will not be colored. { memmove(msg + 1, msg, ke::Min(len++, 191)); *msg = 1;