From 374c042880b9cd216bf4ef88a745b0d6c0611e16 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 7 Oct 2008 01:49:49 -0500 Subject: [PATCH] msi: Remove the columns in reverse order. --- dlls/msi/table.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 4f320b66c64..edd05199b10 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -943,7 +943,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, UINT r, i, n=0, table_id, count, maxcount = *sz; MSITABLE *table = NULL; - TRACE("%s\n", debugstr_w(szTableName)); + TRACE("%s %d\n", debugstr_w(szTableName), *sz); /* first check if there is a default table with that name */ r = get_defaulttablecolumns( db, szTableName, colinfo, sz ); @@ -2055,11 +2055,12 @@ static UINT TABLE_drop(struct tagMSIVIEW *view) MSITABLEVIEW *tv = (MSITABLEVIEW*)view; MSIVIEW *tables = NULL; MSIRECORD *rec = NULL; - UINT i, r, row; + UINT r, row; + INT i; TRACE("dropping table %s\n", debugstr_w(tv->name)); - for (i = 0; i < tv->table->col_count; i++) + for (i = tv->table->col_count - 1; i >= 0; i--) { r = TABLE_remove_column(view, tv->table->colinfo[i].tablename, tv->table->colinfo[i].number);