msi: Treat an empty string and a NULL string as the same value.
This commit is contained in:
parent
d03e2696cf
commit
5e81dbebb0
|
@ -1562,6 +1562,24 @@ static void test_where(void)
|
|||
ok( r == ERROR_SUCCESS, "query failed: %d\n", r );
|
||||
MsiCloseHandle( rec );
|
||||
|
||||
rec = MsiCreateRecord(1);
|
||||
MsiRecordSetString(rec, 1, "");
|
||||
|
||||
query = "SELECT * FROM `Media` WHERE `DiskPrompt` = ?";
|
||||
r = MsiDatabaseOpenView(hdb, query, &view);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
r = MsiViewExecute(view, rec);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
MsiCloseHandle(rec);
|
||||
|
||||
r = MsiViewFetch(view, &rec);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
MsiCloseHandle(rec);
|
||||
MsiViewClose(view);
|
||||
MsiCloseHandle(view);
|
||||
|
||||
MsiCloseHandle( hdb );
|
||||
DeleteFile(msifile);
|
||||
}
|
||||
|
|
|
@ -192,7 +192,8 @@ static UINT STRCMP_Evaluate( MSIWHEREVIEW *wv, UINT row, const struct expr *cond
|
|||
|
||||
l_str = STRING_evaluate( wv, row, cond->u.expr.left, record );
|
||||
r_str = STRING_evaluate( wv, row, cond->u.expr.right, record );
|
||||
if( l_str == r_str )
|
||||
if( l_str == r_str ||
|
||||
((!l_str || !*l_str) && (!r_str || !*r_str)) )
|
||||
sr = 0;
|
||||
else if( l_str && ! r_str )
|
||||
sr = 1;
|
||||
|
|
Loading…
Reference in New Issue