diff options
author | Eugene Sandulenko | 2018-05-21 22:31:56 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-05-21 22:32:24 +0200 |
commit | ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3 (patch) | |
tree | 7ddd9ee677ea3b422cd0cdc7f3c5db64f06a7921 /engines/fullpipe | |
parent | 07efcfd458e961d0751ac2aedb26f35737864e76 (diff) | |
download | scummvm-rg350-ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3.tar.gz scummvm-rg350-ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3.tar.bz2 scummvm-rg350-ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3.zip |
FULLPIPE: Properly reserve arrays when deserializing. Pointed by whiterandrek
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index c1cf912de6..3b60e962c6 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -49,7 +49,7 @@ bool ObArray::load(MfcArchive &file) { debugC(5, kDebugLoading, "ObArray::load()"); int count = file.readCount(); - resize(count); + reserve(count); for (int i = 0; i < count; i++) { CObject *t = file.readClass<CObject>(); @@ -66,7 +66,7 @@ bool DWordArray::load(MfcArchive &file) { debugC(9, kDebugLoading, "DWordArray::count: %d", count); - resize(count); + reserve(count); for (int i = 0; i < count; i++) { int32 t = file.readSint32LE(); |