(svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions.

This commit is contained in:
rubidium
2007-12-08 14:50:41 +00:00
parent 73c58d8a40
commit f1e4914b5f
13 changed files with 19 additions and 16 deletions

View File

@@ -292,7 +292,7 @@ TextEffectID AddTextEffect(StringID msg, int x, int y, uint16 duration, TextEffe
/* 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<TextEffect>(_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;
}