diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 8d416f2910e..444c2a85308 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1378,7 +1378,9 @@ static UINT msi_table_modify_row( MSITABLEVIEW *tv, MSIRECORD *rec, if( (~tv->columns[i].type & MSITYPE_KEY) && (~mask & (1<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 ); diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 832e9eb3ccf..0a3125eda10 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -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);