oleaut32: Fix SLTG_ReadString to null terminate.

This commit is contained in:
Sunil Mohan 2009-08-18 10:48:42 +05:30 committed by Alexandre Julliard
parent ca4c571818
commit f7f50d1252
1 changed files with 1 additions and 1 deletions

View File

@ -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;