From 1b71599d86b66b53e601ec7c5781c63d4d07d595 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 15 Apr 2007 13:41:54 +0000 Subject: MSVC8 apparently complains about uninitialized variables there, fixing (see bug #1700986) svn-id: r26495 --- engines/gob/inter_v1.cpp | 1 + engines/gob/inter_v2.cpp | 2 ++ engines/gob/util.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 052aef0e25..b1bf04045f 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -2227,6 +2227,7 @@ bool Inter_v1::o1_readData(OpFuncParams ¶ms) { dataVar = _vm->_parse->parseVarIndex(); size = _vm->_parse->parseValExpr(); offset = _vm->_parse->parseValExpr(); + retSize = 0; if (_vm->_game->_extHandle >= 0) _vm->_dataIO->closeData(_vm->_game->_extHandle); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 3f76be5498..5dc5edd823 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1827,6 +1827,7 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { size = _vm->_parse->parseValExpr(); evalExpr(0); offset = _vm->_global->_inter_resVal; + retSize = 0; debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)", _vm->_global->_inter_resStr, dataVar, size, offset); @@ -2023,6 +2024,7 @@ int16 Inter_v2::loadSound(int16 search) { type = SOUND_SND; slotIdMask = 0; + dataSize = 0; if (!search) { slot = _vm->_parse->parseValExpr(); diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index e2ef60d5e2..00665acb96 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -82,7 +82,7 @@ void Util::initInput(void) { void Util::processInput(bool scroll) { Common::Event event; Common::EventManager *eventMan = g_system->getEventManager(); - int16 x, y; + int16 x = 0, y = 0; bool hasMove = false; while (eventMan->pollEvent(event)) { -- cgit v1.2.3