Commit 259b5fdf authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Treat empty string as NULL in MsiGetSummaryInformationW.

parent 2b2fa04c
......@@ -469,7 +469,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
if( !pHandle )
return ERROR_INVALID_PARAMETER;
if( szDatabase )
if( szDatabase && szDatabase[0] )
{
LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_TRANSACT : MSIDBOPEN_READONLY;
......
......@@ -86,7 +86,18 @@ static void test_suminfo(void)
ok(r == ERROR_INVALID_PARAMETER, "MsiGetSummaryInformation wrong error\n");
r = MsiGetSummaryInformation(hdb, NULL, 0, &hsuminfo);
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n");
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed %u\n", r);
r = MsiCloseHandle(hsuminfo);
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
r = MsiGetSummaryInformation(0, "", 0, &hsuminfo);
todo_wine
ok(r == ERROR_INSTALL_PACKAGE_INVALID || r == ERROR_INSTALL_PACKAGE_OPEN_FAILED,
"MsiGetSummaryInformation failed %u\n", r);
r = MsiGetSummaryInformation(hdb, "", 0, &hsuminfo);
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed %u\n", r);
r = MsiSummaryInfoGetPropertyCount(0, NULL);
ok(r == ERROR_INVALID_HANDLE, "getpropcount failed\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment