[4/4] msi: Fix calculation of required buffer size in MsiSummaryInfoGetPropertyW.
Hans Leidekker
hans at codeweavers.com
Fri Oct 23 03:49:44 CDT 2009
---
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
{
--
1.6.3.3
More information about the wine-patches
mailing list