Module: wine Branch: master Commit: e58ebbf3e0e446375399558d93b7120082f34f22 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e58ebbf3e0e446375399558d93...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Oct 23 10:49:44 2009 +0200
msi: Fix calculation of required buffer size in MsiSummaryInfoGetPropertyW.
---
dlls/msi/suminfo.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index d3db44a..df35c4d 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -607,9 +607,8 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType,
if( str->unicode ) { - len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, - str->str.w, *pcchValueBuf ); - len--; + len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, NULL, 0 ) - 1; + MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, str->str.w, *pcchValueBuf ); } else {