diff --git a/dlls/msi/table.c b/dlls/msi/table.c index dd611d2e230..420519b7a55 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -873,6 +873,24 @@ static const MSICOLUMNINFO _Tables_cols[1] = { { szTables, 1, szName, MSITYPE_VALID | MSITYPE_STRING | 64, 0 }, }; +static void table_calc_column_offsets( MSICOLUMNINFO *colinfo, DWORD count ) +{ + DWORD i; + + for( i=0; colinfo && (i= *sz) ) break; } + table_calc_column_offsets( colinfo, n ); *sz = n; return ERROR_SUCCESS; } @@ -994,26 +1013,14 @@ static UINT get_tablecolumns( MSIDATABASE *db, TRACE("%s has %d columns\n", debugstr_w(szTableName), n); - if (maxcount && n != maxcount) + if (colinfo && n != maxcount) { ERR("missing column in table %s\n", debugstr_w(szTableName)); msi_free_colinfo(colinfo, maxcount ); return ERROR_FUNCTION_FAILED; } - /* calculate the offsets */ - for( i=0; maxcount && (i