MultiByteToWideChar() returns characters, not bytes.
This commit is contained in:
parent
26c0b76bf8
commit
c2806fa15e
|
@ -883,7 +883,7 @@ Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc)
|
||||||
|
|
||||||
if (lpSrc) {
|
if (lpSrc) {
|
||||||
INT len = MultiByteToWideChar(CP_ACP,0,lpSrc,-1,NULL,0);
|
INT len = MultiByteToWideChar(CP_ACP,0,lpSrc,-1,NULL,0);
|
||||||
LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len);
|
LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len*sizeof(WCHAR));
|
||||||
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue