msi: Fix column width calculation.

The iTunes 8 installer database has an integer column of size 1 which
takes up two bytes at storage level, so adjust the column size calculation
to account for this difference.
This commit is contained in:
Hans Leidekker 2009-08-04 12:20:10 +02:00 committed by Alexandre Julliard
parent 0b60ed8ff1
commit eb101df687
1 changed files with 8 additions and 2 deletions

View File

@ -127,11 +127,17 @@ static inline UINT bytes_per_column( MSIDATABASE *db, const MSICOLUMNINFO *col )
{
if( MSITYPE_IS_BINARY(col->type) )
return 2;
if( col->type & MSITYPE_STRING )
return db->bytes_per_strref;
if( (col->type & 0xff) > 4 )
if( (col->type & 0xff) <= 2)
return 2;
if( (col->type & 0xff) != 4 )
ERR("Invalid column size!\n");
return col->type & 0xff;
return 4;
}
static int utf2mime(int x)