From e74bdbf410152bf4610844369dc44358ce429882 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 17 Jul 2019 17:25:37 +0200 Subject: HDB: Fix uninitalised reads --- engines/hdb/gfx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()); -- cgit v1.2.3