aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Boutonné2009-09-29 16:56:30 +0000
committerArnaud Boutonné2009-09-29 16:56:30 +0000
commitf6aaafae7c602311a65838f4b798e7a536057ea7 (patch)
tree97d0444acbbbc62844d40cedc13a97439af0358c
parent6f6b6993909326cbd5fe293cf2d3b35a93e56c91 (diff)
downloadscummvm-rg350-f6aaafae7c602311a65838f4b798e7a536057ea7.tar.gz
scummvm-rg350-f6aaafae7c602311a65838f4b798e7a536057ea7.tar.bz2
scummvm-rg350-f6aaafae7c602311a65838f4b798e7a536057ea7.zip
Gob - Silence a Valgrind warning by initializing a variable
svn-id: r44467
-rw-r--r--engines/gob/dataio.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index 3b7a61d485..ec4818837d 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -361,6 +361,8 @@ uint32 DataIO::getChunkPos(int16 handle) const {
}
int32 DataIO::getChunkSize(const char *chunkName, int32 &packSize) {
+ packSize = -1;
+
for (int16 file = 0; file < MAX_DATA_FILES; file++) {
if (_dataFiles[file] == 0)
return -1;
@@ -370,10 +372,8 @@ int32 DataIO::getChunkSize(const char *chunkName, int32 &packSize) {
if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
continue;
- if (dataDesc->packed == 0) {
- packSize = -1;
+ if (dataDesc->packed == 0)
return dataDesc->size;
- }
for (int16 slot = 0; slot < MAX_SLOT_COUNT; slot++)
_isCurrentSlot[slot] = false;