From e58ebbf3e0e446375399558d93b7120082f34f22 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 23 Oct 2009 10:49:44 +0200 Subject: [PATCH] msi: Fix calculation of required buffer size in MsiSummaryInfoGetPropertyW. --- dlls/msi/suminfo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index d3db44aa36e..df35c4d0d4c 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 {