aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authorFilippos Karapetis2018-12-23 20:43:28 +0200
committerFilippos Karapetis2018-12-23 20:43:28 +0200
commit7c5acdaa4b390198df20afc0c88ff22a87203342 (patch)
tree6f3d1f5d166de87e04b7f893b1273099ee3ead98 /engines/sludge
parent92aa71395849afc4b31cec8af71b82d1330c1ab5 (diff)
downloadscummvm-rg350-7c5acdaa4b390198df20afc0c88ff22a87203342.tar.gz
scummvm-rg350-7c5acdaa4b390198df20afc0c88ff22a87203342.tar.bz2
scummvm-rg350-7c5acdaa4b390198df20afc0c88ff22a87203342.zip
SLUDGE: Fix a potentially uninitialized variable
Variable "n" was not initialized if "stillToGo" was non-zero
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/zbuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sludge/zbuffer.cpp b/engines/sludge/zbuffer.cpp
index 02dddd068e..4d2ae01f10 100644
--- a/engines/sludge/zbuffer.cpp
+++ b/engines/sludge/zbuffer.cpp
@@ -137,7 +137,7 @@ bool GraphicsManager::setZBuffer(int num) {
for (uint y = 0; y < _sceneHeight; y++) {
for (uint x = 0; x < _sceneWidth; x++) {
- int n;
+ int n = 0;
if (stillToGo == 0) {
n = readStream->readByte();
stillToGo = n >> 4;