Module: wine Branch: master Commit: 374c042880b9cd216bf4ef88a745b0d6c0611e16 URL: http://source.winehq.org/git/wine.git/?a=commit;h=374c042880b9cd216bf4ef88a7...
Author: James Hawkins jhawkins@codeweavers.com Date: Tue Oct 7 01:49:49 2008 -0500
msi: Remove the columns in reverse order.
---
dlls/msi/table.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 4f320b6..edd0519 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);