Merge from Git repository

--HG--
branch : develop
This commit is contained in:
NO-BREAK SPACE OÜ 2019-05-08 20:47:50 +00:00
commit 09e21a115f

View file

@ -144,7 +144,7 @@ std::string winCpToCp(const char *str, size_t len, UINT srcCp, UINT dstCp)
wchar_t *tmp = (wchar_t *)_malloca((len + 1) * 4);
if (!tmp)
return std::string();
int tmpLen = MultiByteToWideChar(srcCp, MB_PRECOMPOSED,
int tmpLen = MultiByteToWideChar(srcCp, 0,
str, (int)(len + 1), /* include null-termination */
tmp, (int)((len + 1) * 4));
if (tmpLen <= 1)
@ -170,7 +170,7 @@ std::wstring winCpToWide(const char *str, size_t len, UINT cp)
wchar_t *tmp = (wchar_t *)_malloca((len + 1) * 4);
if (!tmp)
return std::wstring();
int tmpLen = MultiByteToWideChar(cp, MB_PRECOMPOSED,
int tmpLen = MultiByteToWideChar(cp, 0,
str, (int)(len + 1), /* include null-termination */
tmp, (int)((len + 1) * 4));
if (tmpLen <= 1)