mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
A silly mistake on r217 was fixed.
This commit is contained in:
parent
8414159d62
commit
f8bd5fb2eb
@ -129,12 +129,12 @@ std::wstring ConvertToWide(LPCSTR str)
|
|||||||
if (str && *str)
|
if (str && *str)
|
||||||
{
|
{
|
||||||
int strLen = (int)strlen(str) + 1;
|
int strLen = (int)strlen(str) + 1;
|
||||||
int bufLen = MultiByteToWideChar(CP_ACP, 0, str, strLen, NULL, 0);
|
int bufLen = MultiByteToWideChar(CP_UTF8, 0, str, strLen, NULL, 0);
|
||||||
if (bufLen > 0)
|
if (bufLen > 0)
|
||||||
{
|
{
|
||||||
WCHAR* wideSz = new WCHAR[bufLen];
|
WCHAR* wideSz = new WCHAR[bufLen];
|
||||||
wideSz[0] = 0;
|
wideSz[0] = 0;
|
||||||
MultiByteToWideChar(CP_ACP, 0, str, strLen, wideSz, bufLen);
|
MultiByteToWideChar(CP_UTF8, 0, str, strLen, wideSz, bufLen);
|
||||||
szWide = wideSz;
|
szWide = wideSz;
|
||||||
delete [] wideSz;
|
delete [] wideSz;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user