aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authorSebastian Krzyszkowiak2019-06-17 19:08:43 +0200
committerFilippos Karapetis2019-06-17 23:08:00 +0300
commitb428c23c75efae41fa7d907f5676faf05bc338e0 (patch)
tree4bc56f10973074ef259a6bf1badefac0f11ded68 /engines/sludge
parentbdf85e33cbcf8ec6906e566dbcf6cd2a10f98901 (diff)
downloadscummvm-rg350-b428c23c75efae41fa7d907f5676faf05bc338e0.tar.gz
scummvm-rg350-b428c23c75efae41fa7d907f5676faf05bc338e0.tar.bz2
scummvm-rg350-b428c23c75efae41fa7d907f5676faf05bc338e0.zip
SLUDGE: fix crash in ResourceManager::readResourceNames
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/fileset.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sludge/fileset.cpp b/engines/sludge/fileset.cpp
index c9c3e7a43b..4f671ebbff 100644
--- a/engines/sludge/fileset.cpp
+++ b/engines/sludge/fileset.cpp
@@ -224,8 +224,7 @@ void ResourceManager::readResourceNames(Common::SeekableReadStream *readStream)
_allResourceNames.reserve(numResourceNames);
for (int fn = 0; fn < numResourceNames; fn++) {
- _allResourceNames[fn].clear();
- _allResourceNames[fn] = readString(readStream);
+ _allResourceNames.push_back(readString(readStream));
debugC(2, kSludgeDebugDataLoad, "Resource %i: %s", fn, _allResourceNames[fn].c_str());
}
}