aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorWinterGrascph2016-05-17 23:09:56 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitd49c081785bc4eab83246a9c9697604692f47b1d (patch)
tree83819d67ab4ea2a199a83e6a169adcbaf2bbe8dc /engines/dm
parent7ddd96bc60e9a5cbe33a5a246f5a8709d4948181 (diff)
downloadscummvm-rg350-d49c081785bc4eab83246a9c9697604692f47b1d.tar.gz
scummvm-rg350-d49c081785bc4eab83246a9c9697604692f47b1d.tar.bz2
scummvm-rg350-d49c081785bc4eab83246a9c9697604692f47b1d.zip
DM: Fix loadDungeonFile(..) zero sized array allocation
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/dungeonman.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 2d700f3d89..d467f5904c 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -293,6 +293,8 @@ void DungeonMan::loadDungeonFile() {
}
uint16 thingStoreWordCount = gThingDataWordCount[thingType];
+ if (thingStoreWordCount == 0)
+ continue;
if (_dunData.thingsData[thingType]) {
delete[] _dunData.thingsData[thingType][0];