diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -32,9 +32,9 @@ static std::vector _sounds; */ SoundEntry *AllocateSound(uint num) { - SoundEntry *sound = grow(_sounds, num); - MemSetT(sound, 0, num); - return sound; + size_t pos = _sounds.size(); + _sounds.insert(_sounds.end(), num, SoundEntry()); + return &_sounds[pos]; }