Module: wine Branch: master Commit: f2c207fa0356c094c6e5c9ecde3083e9fc07bbf4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2c207fa0356c094c6e5c9ecde...
Author: Mike McCormack mike@codeweavers.com Date: Fri Oct 20 01:53:32 2006 +0900
msi: Reset the column number for each new table in a transform.
---
dlls/msi/table.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 087f407..15f4da2 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1860,7 +1860,9 @@ static UINT msi_table_load_transform( MS UINT r, n, sz, i, mask; MSIRECORD *rec = NULL; UINT colcol = 0; + WCHAR coltable[32];
+ coltable[0] = 0; TRACE("%p %p %p %s\n", db, stg, st, debugstr_w(name) );
/* read the transform data */ @@ -1937,10 +1939,20 @@ static UINT msi_table_load_transform( MS */ if (!lstrcmpW(name, szColumns)) { - if ( MSI_RecordIsNull( rec, 2 ) ) - MSI_RecordSetInteger( rec, 2, ++colcol ); - else - ERR("_Columns has non-null data...\n"); + WCHAR table[32]; + DWORD sz = 32; + + MSI_RecordGetStringW( rec, 1, table, &sz ); + + /* reset the column number on a new table */ + if ( lstrcmpW(coltable, table) ) + { + colcol = 0; + lstrcpyW( coltable, table ); + } + + /* fix nul column numbers */ + MSI_RecordSetInteger( rec, 2, ++colcol ); }
r = TABLE_insert_row( &tv->view, rec );