aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-16 20:23:22 -0400
committerPaul Gilbert2018-03-16 20:23:22 -0400
commitfe80dcb4fec0dcf033292523a2e3fa9bb5213574 (patch)
tree59e70d78893c2e8caa4c7a2f561d08c859a6ad0c
parent26782415dfc6f0ecbf98a1553aee79125c70b541 (diff)
downloadscummvm-rg350-fe80dcb4fec0dcf033292523a2e3fa9bb5213574.tar.gz
scummvm-rg350-fe80dcb4fec0dcf033292523a2e3fa9bb5213574.tar.bz2
scummvm-rg350-fe80dcb4fec0dcf033292523a2e3fa9bb5213574.zip
XEEN: Don't add monsters in setSpeedTable if they're dead
I think this should fix a crash I rarely got in doMonsterTurn
-rw-r--r--engines/xeen/combat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 603b6aef71..6c293bc36d 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -1108,7 +1108,7 @@ void Combat::setSpeedTable() {
// Populate the _speedTable list with the character/monster indexes
// in order of attacking speed
_speedTable.clear();
- for (; maxSpeed >= 0; --maxSpeed) {
+ for (; maxSpeed > 0; --maxSpeed) {
for (uint idx = 0; idx < charSpeeds.size(); ++idx) {
if (charSpeeds[idx] == maxSpeed)
_speedTable.push_back(idx);