Commit f6c7ae6a authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Fix insertion of null integers into a table.

parent 88580113
......@@ -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);
......
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