aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2017-01-16 07:22:32 +0000
committerD G Turner2017-01-16 07:22:32 +0000
commit657e5414fe13d8494f23b2c99ccf149a94742078 (patch)
treeda1c0527424a40ef0db6adbe821702e5bf48b1b1
parent694a84070466a370e16dd503803d0ebc3b132a36 (diff)
downloadscummvm-rg350-657e5414fe13d8494f23b2c99ccf149a94742078.tar.gz
scummvm-rg350-657e5414fe13d8494f23b2c99ccf149a94742078.tar.bz2
scummvm-rg350-657e5414fe13d8494f23b2c99ccf149a94742078.zip
SCI: Fix Possible Uninitialized Variable Usages.
-rw-r--r--engines/sci/engine/savegame.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 5184874064..561b74d354 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);