Sunil Mohan : oleaut32: Fix SLTG_ReadString to null terminate.
Module: wine Branch: master Commit: f7f50d1252342db0fc035f9066b6ab10ae5f20a6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7f50d1252342db0fc035f9066... Author: Sunil Mohan <sunilmohan(a)fsf.org.in> Date: Tue Aug 18 11:06:42 2009 +0530 oleaut32: Fix SLTG_ReadString to null terminate. --- dlls/oleaut32/typelib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 1f104f8..f16b459 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -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;
participants (1)
-
Alexandre Julliard