[Scummvm-git-logs] scummvm master -> 657e5414fe13d8494f23b2c99ccf149a94742078

digitall dgturner at iee.org
Mon Jan 16 08:19:42 CET 2017


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:
657e5414fe SCI: Fix Possible Uninitialized Variable Usages.


Commit: 657e5414fe13d8494f23b2c99ccf149a94742078
    https://github.com/scummvm/scummvm/commit/657e5414fe13d8494f23b2c99ccf149a94742078
Author: D G Turner (digitall at scummvm.org)
Date: 2017-01-16T07:22:32Z

Commit Message:
SCI: Fix Possible Uninitialized Variable Usages.

Changed paths:
    engines/sci/engine/savegame.cpp


diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 5184874..561b74d 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -118,7 +118,7 @@ struct SegmentObjTableEntrySyncer : Common::BinaryFunction<Common::Serializer, t
 	void operator()(Common::Serializer &s, typename T::Entry &entry, int index) const {
 		s.syncAsSint32LE(entry.next_free);
 
-		bool hasData;
+		bool hasData = false;
 		if (s.getVersion() >= 37) {
 			if (s.isSaving()) {
 				hasData = entry.data != nullptr;
@@ -810,7 +810,7 @@ static void saveLoadPalette32(Common::Serializer &s, Palette *const palette) {
 }
 
 static void saveLoadOptionalPalette32(Common::Serializer &s, Palette **const palette) {
-	bool hasPalette;
+	bool hasPalette = false;
 	if (s.isSaving()) {
 		hasPalette = (*palette != nullptr);
 	}
@@ -867,7 +867,7 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
 	for (int i = 0; i < ARRAYSIZE(_cyclers); ++i) {
 		PalCycler *cycler = nullptr;
 
-		bool hasCycler;
+		bool hasCycler = false;
 		if (s.isSaving()) {
 			cycler = _cyclers[i];
 			hasCycler = (cycler != nullptr);





More information about the Scummvm-git-logs mailing list