HDB: Consistent memory management for map explosions

This commit is contained in:
Eugene Sandulenko 2019-07-13 15:40:35 +02:00
parent f83f965462
commit 614fc61254

View File

@ -180,15 +180,15 @@ void Map::loadSaveFile(Common::InSaveFile *in) {
for (i = 0; i < _width * _height; i++)
_foreground[i] = in->readSint32LE();
_mapExplosions = new byte[_width * _height];
_mapExplosions = (byte *)malloc(_width * _height);
for (i = 0; i < _width * _height; i++)
_mapExplosions[i] = in->readByte();
_mapExpBarrels = new byte[_width * _height];
_mapExpBarrels = (byte *)malloc(_width * _height);
for (i = 0; i < _width * _height; i++)
_mapExpBarrels[i] = in->readByte();
_mapLaserBeams = new byte[_width * _height];
_mapLaserBeams = (byte *)malloc(_width * _height);
for (i = 0; i < _width * _height; i++)
_mapLaserBeams[i] = in->readByte();