Make sure to set the minimum size before allocating string table

memory.
This commit is contained in:
Mike McCormack 2005-09-26 09:54:56 +00:00 committed by Alexandre Julliard
parent c63b85b866
commit de71dbb2d8
1 changed files with 2 additions and 2 deletions

View File

@ -75,14 +75,14 @@ string_table *msi_init_stringtable( int entries, UINT codepage )
st = msi_alloc( sizeof (string_table) );
if( !st )
return NULL;
if( entries < 1 )
entries = 1;
st->strings = msi_alloc_zero( sizeof (msistring) * entries );
if( !st )
{
msi_free( st );
return NULL;
}
if( entries < 1 )
entries = 1;
st->maxcount = entries;
st->freeslot = 1;
st->codepage = codepage;