From 6f5b64a669751ad1738564fe11b58725b51ad047 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 25 Nov 2016 13:18:40 +0100 Subject: [PATCH] Fixed: In MBCS mode, convert to std::string --- code/nel/include/nel/misc/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index c677a01bf..f1c090c2b 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -291,7 +291,7 @@ inline sint nlstricmp(const char *lhs, const std::string &rhs) { return stricmp( #define tStrToUtf8(str) (ucstring((ucchar*)(LPCWSTR)str).toUtf8()) #define utf8ToTStr(str) ((wchar_t*)ucstring::makeFromUtf8(str).c_str()) #else -#define tStrToUtf8(str) ((LPCSTR)str) +#define tStrToUtf8(str) (std::string((LPCSTR)str)) #define utf8ToTStr(str) (str.c_str()) #endif