mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
HDB: Consistent memory management for map explosions
This commit is contained in:
parent
f83f965462
commit
614fc61254
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user