oleaut32: Fix SLTG_ReadString to null terminate.
This commit is contained in:
parent
ca4c571818
commit
f7f50d1252
|
@ -3052,7 +3052,7 @@ static WORD SLTG_ReadString(const char *ptr, BSTR *pBstr)
|
|||
bytelen = *(const WORD*)ptr;
|
||||
if(bytelen == 0xffff) return 2;
|
||||
len = MultiByteToWideChar(CP_ACP, 0, ptr + 2, bytelen, NULL, 0);
|
||||
*pBstr = SysAllocStringLen(NULL, len - 1);
|
||||
*pBstr = SysAllocStringLen(NULL, len);
|
||||
if (*pBstr)
|
||||
len = MultiByteToWideChar(CP_ACP, 0, ptr + 2, bytelen, *pBstr, len);
|
||||
return bytelen + 2;
|
||||
|
|
Loading…
Reference in New Issue