diff options
Diffstat (limited to 'setup_native/source/win32/customactions/tools/checkversion.cxx')
-rw-r--r-- | setup_native/source/win32/customactions/tools/checkversion.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx index 8de46807a579..3d73df89d6b6 100644 --- a/setup_native/source/win32/customactions/tools/checkversion.cxx +++ b/setup_native/source/win32/customactions/tools/checkversion.cxx @@ -38,14 +38,14 @@ BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue ) { DWORD sz = 0; - if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA ) - { - sz++; - DWORD nbytes = sz * sizeof( wchar_t ); - wchar_t* buff = static_cast<wchar_t*>( malloc( nbytes ) ); - ZeroMemory( buff, nbytes ); - MsiGetPropertyW( hMSI, pPropName, buff, &sz ); - *ppValue = buff; + if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA ) + { + sz++; + DWORD nbytes = sz * sizeof( wchar_t ); + wchar_t* buff = static_cast<wchar_t*>( malloc( nbytes ) ); + ZeroMemory( buff, nbytes ); + MsiGetPropertyW( hMSI, pPropName, buff, &sz ); + *ppValue = buff; return TRUE; } |