aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-12 05:04:18 +0530
committerEugene Sandulenko2019-09-03 17:17:17 +0200
commitbcaf795b593279aef3faabaa3234d7b35c96f99c (patch)
tree4dbcc4f376c2f45d263f7d07fac910951f1f235f
parentd8f454dfe1bbc0490050710f2679b768338d74da (diff)
downloadscummvm-rg350-bcaf795b593279aef3faabaa3234d7b35c96f99c.tar.gz
scummvm-rg350-bcaf795b593279aef3faabaa3234d7b35c96f99c.tar.bz2
scummvm-rg350-bcaf795b593279aef3faabaa3234d7b35c96f99c.zip
HDB: Fix out-of-bounds access bug
-rw-r--r--engines/hdb/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index ddc397d901..56e8fee21d 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -488,7 +488,7 @@ void Gfx::setup3DStarsLeft() {
for (int i = 0; i < kNum3DStars; i++) {
_stars3DSlow[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth);
_stars3DSlow[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight);
- _stars3DSlow[i].speed = ((double) (1 + g_hdb->_rnd->getRandomNumber(5))) / 6.0;
+ _stars3DSlow[i].speed = ((double) (1 + g_hdb->_rnd->getRandomNumber(4))) / 6.0;
_stars3DSlow[i].color = (int) (_stars3DSlow[i].speed * 4.00);
}
}