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

msi: Reset the column number for each new table in a transform.

parent 1f32d1f3
......@@ -1860,7 +1860,9 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
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( MSIDATABASE *db, IStorage *stg,
*/
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 );
......
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