[Scummvm-git-logs] scummvm master -> 17906600b736d2f82dd245b8ade96915c282dbca

neuromancer noreply at scummvm.org
Sun Feb 20 17:34:51 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
17906600b7 HYPNO: avoid crash with invalid rect in spider


Commit: 17906600b736d2f82dd245b8ade96915c282dbca
    https://github.com/scummvm/scummvm/commit/17906600b736d2f82dd245b8ade96915c282dbca
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-20T18:34:58+01:00

Commit Message:
HYPNO: avoid crash with invalid rect in spider

Changed paths:
    engines/hypno/spider/arcade.cpp


diff --git a/engines/hypno/spider/arcade.cpp b/engines/hypno/spider/arcade.cpp
index a3535a333b5..d28b277e78a 100644
--- a/engines/hypno/spider/arcade.cpp
+++ b/engines/hypno/spider/arcade.cpp
@@ -185,7 +185,8 @@ void SpiderEngine::drawHealth() {
 	Common::Rect r;
 	uint32 c;
 	int d = (22 * (_maxHealth - _health) / _maxHealth);
-
+	if (d >= 22)
+		return;
 	r = Common::Rect(256, 152 + d, 272, 174);
 	if (d >= 11)
 		c = 250; // red




More information about the Scummvm-git-logs mailing list