diff --git a/src/texteff.cpp b/src/texteff.cpp --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -292,7 +292,7 @@ TextEffectID AddTextEffect(StringID msg, /* If there is none found, we grow the array */ if (i == _num_text_effects) { _num_text_effects += 25; - _text_effect_list = (TextEffect*) realloc(_text_effect_list, _num_text_effects * sizeof(TextEffect)); + _text_effect_list = ReallocT(_text_effect_list, _num_text_effects); for (; i < _num_text_effects; i++) _text_effect_list[i].string_id = INVALID_STRING_ID; i = _num_text_effects - 1; }