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 {