From 07d5570a46ddf648260e5a7c9792dff2f93a3429 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 4 Jul 2019 14:17:09 +0000 Subject: [PATCH] Core: Fixed issue with UTF8 string comparison git-svn-id: svn://ultimatepp.org/upp/trunk@13475 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Ops.h b/uppsrc/Core/Ops.h index 15e63643b..d9d2884b5 100644 --- a/uppsrc/Core/Ops.h +++ b/uppsrc/Core/Ops.h @@ -273,7 +273,7 @@ int fast_memcmp(const char *a, const char *b, size_t len) b += 2; } if((len & 1) != 0 && *a != *b) - return *a < *b ? -1 : 1; + return (byte)*a < (byte)*b ? -1 : 1; return 0; } #else