[Scummvm-git-logs] scummvm master -> ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3

sev- sev at scummvm.org
Mon May 21 22:32:32 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ae2637e36e FULLPIPE: Properly reserve arrays when deserializing. Pointed by whiterandrek


Commit: ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3
    https://github.com/scummvm/scummvm/commit/ae2637e36e7e09f9b3061d5b70f5a9f8fe5858c3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-05-21T22:32:24+02:00

Commit Message:
FULLPIPE: Properly reserve arrays when deserializing. Pointed by whiterandrek

Changed paths:
    engines/fullpipe/utils.cpp


diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index c1cf912..3b60e96 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();





More information about the Scummvm-git-logs mailing list