From 81de95671c4a7bfc546db81c90a0a8b4a31349b1 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Oct 2010 13:55:46 +0000 Subject: GOB: Properly fixing the captureCounter code analysis warning svn-id: r53492 --- engines/gob/game.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/gob') diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 50fda8d8cd..98c1066cb0 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -247,7 +247,7 @@ void Game::playTot(int16 skipPlay) { int16 *oldCaptureCounter; int16 *oldBreakFrom; int16 *oldNestLevel; - int16 _captureCounter; + int16 captureCounter = 0; int16 breakFrom; int16 nestLevel; @@ -259,7 +259,7 @@ void Game::playTot(int16 skipPlay) { _vm->_inter->_nestLevel = &nestLevel; _vm->_inter->_breakFromLevel = &breakFrom; - _vm->_scenery->_pCaptureCounter = &_captureCounter; + _vm->_scenery->_pCaptureCounter = &captureCounter; strcpy(savedTotName, _curTotFile); if (skipPlay <= 0) { @@ -337,9 +337,8 @@ void Game::playTot(int16 skipPlay) { _resources->unload(); - if (_vm->_scenery->_pCaptureCounter) - for (int i = 0; i < *_vm->_scenery->_pCaptureCounter; i++) - capturePop(0); + for (int i = 0; i < *_vm->_scenery->_pCaptureCounter; i++) + capturePop(0); if (skipPlay != -1) { _vm->_goblin->freeObjects(); -- cgit v1.2.3