Commit 0fe04130 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

usp10: Use usp10_array_reserve() in usp10_language_add_feature_list().

parent 3c53b193
......@@ -2818,15 +2818,10 @@ static void usp10_language_add_feature_list(LoadedLanguage *language, char table
TRACE("table_type %#x, %u features.\n", table_type, count);
if (!count)
if (!count || !usp10_array_reserve((void **)&language->features, &language->features_size,
language->feature_count + count, sizeof(*language->features)))
return;
if (!language->feature_count)
language->features = heap_alloc(count * sizeof(*language->features));
else
language->features = HeapReAlloc(GetProcessHeap(), 0, language->features,
(language->feature_count + count) * sizeof(*language->features));
for (i = 0; i < count; ++i)
{
const OT_FeatureRecord *record;
......
......@@ -163,8 +163,9 @@ typedef struct {
OPENTYPE_TAG tag;
const void *table[USP10_LANGUAGE_TABLE_COUNT];
BOOL features_initialized;
INT feature_count;
LoadedFeature *features;
SIZE_T features_size;
SIZE_T feature_count;
} LoadedLanguage;
enum usp10_script_table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment