diff options
author | Sven Hesse | 2010-10-15 13:55:46 +0000 |
---|---|---|
committer | Sven Hesse | 2010-10-15 13:55:46 +0000 |
commit | 81de95671c4a7bfc546db81c90a0a8b4a31349b1 (patch) | |
tree | cd977ab0e109b053c37bbe655600c5b879476534 /engines | |
parent | 835455798f2e9876f28a9cb25d354545e6b28715 (diff) | |
download | scummvm-rg350-81de95671c4a7bfc546db81c90a0a8b4a31349b1.tar.gz scummvm-rg350-81de95671c4a7bfc546db81c90a0a8b4a31349b1.tar.bz2 scummvm-rg350-81de95671c4a7bfc546db81c90a0a8b4a31349b1.zip |
GOB: Properly fixing the captureCounter code analysis warning
svn-id: r53492
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/game.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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(); |