aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-17 17:25:37 +0200
committerEugene Sandulenko2019-09-03 17:17:22 +0200
commite74bdbf410152bf4610844369dc44358ce429882 (patch)
tree9d0398c1c7155d5b4ae5723ee6a4f52079255abc
parent9ab298748e15aff4c1c015d2a1590611e75ecece (diff)
downloadscummvm-rg350-e74bdbf410152bf4610844369dc44358ce429882.tar.gz
scummvm-rg350-e74bdbf410152bf4610844369dc44358ce429882.tar.bz2
scummvm-rg350-e74bdbf410152bf4610844369dc44358ce429882.zip
HDB: Fix uninitalised reads
-rw-r--r--engines/hdb/gfx.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 5719b8cea7..f9534eaddf 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -33,6 +33,9 @@ Gfx::Gfx() {
_sines = new Common::SineTable(360);
_cosines = new Common::CosineTable(360);
_systemInit = false;
+
+ memset(&_fadeInfo, 0, sizeof(_fadeInfo));
+ memset(&_snowInfo, 0, sizeof(_snowInfo));
}
Gfx::~Gfx() {
@@ -199,11 +202,12 @@ void Gfx::fillScreen(uint32 color) {
void Gfx::updateVideo() {
updateFade();
- g_hdb->checkProgress();
if (!g_hdb->_progressGfx)
return;
+ g_hdb->checkProgress();
+
int left = kScreenWidth / 2 - g_hdb->_progressGfx->_width / 2;
Common::Rect clip(g_hdb->_progressGfx->getSurface()->getBounds());