msi: Fix insertion of null integers into a table.
This commit is contained in:
parent
8858011375
commit
f6c7ae6a0c
|
@ -1378,7 +1378,9 @@ static UINT msi_table_modify_row( MSITABLEVIEW *tv, MSIRECORD *rec,
|
|||
if( (~tv->columns[i].type & MSITYPE_KEY) && (~mask & (1<<i)) )
|
||||
continue;
|
||||
|
||||
if( (tv->columns[i].type & MSITYPE_STRING) &&
|
||||
if (MSI_RecordIsNull( rec, i+1))
|
||||
val = 0;
|
||||
else if( (tv->columns[i].type & MSITYPE_STRING) &&
|
||||
! MSITYPE_IS_BINARY(tv->columns[i].type) )
|
||||
{
|
||||
const WCHAR *str = MSI_RecordGetString( rec, i+1 );
|
||||
|
|
|
@ -1458,10 +1458,7 @@ static void test_msiimport(void)
|
|||
ok(i == 2, "Expected 2, got %d\n", i);
|
||||
|
||||
i = MsiRecordGetInteger(rec, 4);
|
||||
todo_wine
|
||||
{
|
||||
ok(i == 0x80000000, "Expected 0x80000000, got %d\n", i);
|
||||
}
|
||||
ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
|
||||
|
||||
i = MsiRecordGetInteger(rec, 5);
|
||||
ok(i == 2147483640, "Expected 2147483640, got %d\n", i);
|
||||
|
@ -2887,12 +2884,10 @@ static void test_integers(void)
|
|||
r = MsiRecordGetFieldCount(rec);
|
||||
ok(r == 8, "record count wrong: %d\n", r);
|
||||
|
||||
todo_wine {
|
||||
i = MsiRecordGetInteger(rec, 1);
|
||||
ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
|
||||
i = MsiRecordGetInteger(rec, 3);
|
||||
ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
|
||||
}
|
||||
i = MsiRecordGetInteger(rec, 2);
|
||||
ok(i == 2, "Expected 2, got %d\n", i);
|
||||
i = MsiRecordGetInteger(rec, 4);
|
||||
|
|
Loading…
Reference in New Issue