diff options
author | Bastien Bouclet | 2018-06-22 06:35:24 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-06-22 06:35:24 +0200 |
commit | b0681082a9ee883b72827a3e2348ea2cf9a1f604 (patch) | |
tree | 1701b0e402baddfe67e695584af15ef30d1af366 | |
parent | 6237bc6e7bc06077beec3424ae9e177a74b545b1 (diff) | |
download | scummvm-rg350-b0681082a9ee883b72827a3e2348ea2cf9a1f604.tar.gz scummvm-rg350-b0681082a9ee883b72827a3e2348ea2cf9a1f604.tar.bz2 scummvm-rg350-b0681082a9ee883b72827a3e2348ea2cf9a1f604.zip |
MOHAWK: RIVEN: Fix out of bounds write in the flies effect
Fixes Trac#10579.
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index d4ea8fc703..e19a56da92 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -823,8 +823,8 @@ void FliesEffect::initFlies(uint16 count) { } void FliesEffect::initFlyRandomPosition(uint index) { - int posX = _vm->_rnd->getRandomNumber(_gameRect.right - 3); - int posY = _vm->_rnd->getRandomNumber(_gameRect.bottom - 3); + int posX = _vm->_rnd->getRandomNumber(_gameRect.right - 4); + int posY = _vm->_rnd->getRandomNumber(_gameRect.bottom - 4); if (posY < 100) { posY = 100; |