diff options
author | Strangerke | 2015-12-21 01:49:41 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:35:33 +0100 |
commit | be1fd471be362eff1d6e05bef8b8469655174b16 (patch) | |
tree | ba76fd24b9a26bc362abbb9b6f6dd95dcfcf55c1 /engines | |
parent | 9b6851c1a73b57c262148a2d96ca7c07e32f96a5 (diff) | |
download | scummvm-rg350-be1fd471be362eff1d6e05bef8b8469655174b16.tar.gz scummvm-rg350-be1fd471be362eff1d6e05bef8b8469655174b16.tar.bz2 scummvm-rg350-be1fd471be362eff1d6e05bef8b8469655174b16.zip |
LAB: better fix of loadMapData, taking into account the other loops on _maps
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 63e3571b8f..db0ba206fe 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -87,8 +87,8 @@ void LabEngine::loadMapData() { _music->stopSoundEffect(); _maxRooms = mapFile->readUint16LE(); - _maps = new MapData[_maxRooms]; // will be freed when the user exits the map - for (int i = 0; i < _maxRooms; i++) { + _maps = new MapData[_maxRooms + 1]; // will be freed when the user exits the map + for (int i = 1; i <= _maxRooms; i++) { _maps[i]._x = mapFile->readUint16LE(); _maps[i]._y = mapFile->readUint16LE(); _maps[i]._pageNumber = mapFile->readUint16LE(); |