From d6c3543c1101e451f24609654a930822102f124a Mon Sep 17 00:00:00 2001 From: Ilya Orlov Date: Fri, 3 Aug 2018 01:06:15 +0400 Subject: [PATCH] Revert "xrCore: fix linux xr_strlwr" This reverts commit 61ce3dfc8c03c4e10445afba4f947f80702c85d1. --- src/xrCore/xrstring.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/xrCore/xrstring.h b/src/xrCore/xrstring.h index 9af60082098..6103f0efc9e 100644 --- a/src/xrCore/xrstring.h +++ b/src/xrCore/xrstring.h @@ -206,7 +206,7 @@ IC void xr_strlwr(shared_str& src) int i = 0; while(lp[i]) { - lp[i] = (char) std::tolower(lp[i], std::locale()); + lp[i] = (char) std::toupper(lp[i], std::locale()); i++; } #endif @@ -217,7 +217,13 @@ IC void xr_strlwr(shared_str& src) IC char * xr_strlwr(char * src) { - return SDL_strlwr(src); + int i = 0; + while(src[i]) + { + src[i] = (char) toupper(src[i]);// TODO rewrite locale-independent toupper_l() + i++; + } + return src; } #pragma pack(pop)