From 71747518ad8e95de8fb30ff76b6b5caaf8d7437b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 17 Oct 2007 14:13:53 +0200 Subject: [PATCH] msi: Properly clear the new table data when a column is added. --- dlls/msi/table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index bf7d70552b9..0193649c821 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1041,10 +1041,11 @@ static UINT get_tablecolumns( MSIDATABASE *db, static void msi_update_table_columns( MSIDATABASE *db, LPCWSTR name ) { MSITABLE *table; - UINT size, offset; + UINT size, offset, old_count; int n; table = find_cached_table( db, name ); + old_count = table->col_count; msi_free( table->colinfo ); table_get_column_info( db, name, &table->colinfo, &table->col_count ); @@ -1054,7 +1055,8 @@ static void msi_update_table_columns( MSIDATABASE *db, LPCWSTR name ) for ( n = 0; n < table->row_count; n++ ) { table->data[n] = msi_realloc( table->data[n], size ); - table->data[n][offset] = (BYTE)MSI_NULL_INTEGER; + if (old_count < table->col_count) + memset( &table->data[n][offset], 0, size - offset ); } } -- 2.11.4.GIT