From b428c23c75efae41fa7d907f5676faf05bc338e0 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 17 Jun 2019 19:08:43 +0200 Subject: SLUDGE: fix crash in ResourceManager::readResourceNames --- engines/sludge/fileset.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines') 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()); } } -- cgit v1.2.3