diff options
author | Eugene Sandulenko | 2019-07-13 15:40:35 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:18 +0200 |
commit | 614fc61254785f95cb4f477732ed9dcaf1717ecf (patch) | |
tree | c8042e069b3be86adf53c7cfe3454513836ca755 | |
parent | f83f965462cf2de90915d516ac0dceff255c2ad9 (diff) | |
download | scummvm-rg350-614fc61254785f95cb4f477732ed9dcaf1717ecf.tar.gz scummvm-rg350-614fc61254785f95cb4f477732ed9dcaf1717ecf.tar.bz2 scummvm-rg350-614fc61254785f95cb4f477732ed9dcaf1717ecf.zip |
HDB: Consistent memory management for map explosions
-rw-r--r-- | engines/hdb/map.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index 86bd03fbac..9a68c808dc 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -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(); |