msi: Fix comparison of table ids in TABLE_Exists.
This commit is contained in:
parent
18cd143086
commit
d8b5879798
|
@ -988,8 +988,8 @@ done:
|
||||||
/* try to find the table name in the _Tables table */
|
/* try to find the table name in the _Tables table */
|
||||||
BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name )
|
BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name )
|
||||||
{
|
{
|
||||||
UINT r, table_id = 0, i, count;
|
UINT r, table_id, i;
|
||||||
MSITABLE *table = NULL;
|
MSITABLE *table;
|
||||||
|
|
||||||
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
|
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
|
||||||
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
|
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
|
||||||
|
@ -1012,10 +1012,11 @@ BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = table->row_count;
|
for( i = 0; i < table->row_count; i++ )
|
||||||
for( i=0; i<count; i++ )
|
{
|
||||||
if( table->data[ i ][ 0 ] == table_id )
|
if( read_table_int( table->data, i, 0, db->bytes_per_strref ) == table_id )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue