[Scummvm-git-logs] scummvm master -> ce6eb1636b7cdc44f483bfea201acc19e0fdb8c8

dreammaster dreammaster at scummvm.org
Tue Jan 16 03:16:31 CET 2018


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:
ce6eb1636b XEEN: Fix crash at end of combat turn


Commit: ce6eb1636b7cdc44f483bfea201acc19e0fdb8c8
    https://github.com/scummvm/scummvm/commit/ce6eb1636b7cdc44f483bfea201acc19e0fdb8c8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-01-15T21:16:18-05:00

Commit Message:
XEEN: Fix crash at end of combat turn

Changed paths:
    engines/xeen/combat.cpp


diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index c1c70ac..34246b6 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -1125,7 +1125,11 @@ void Combat::setSpeedTable() {
 }
 
 bool Combat::allHaveGone() const {
-	for (uint idx = 0; idx < _charsGone.size(); ++idx) {
+	int monsCount = (_attackMonsters[0] != -1 ? 1 : 0)
+		+ (_attackMonsters[1] != -1 ? 1 : 0)
+		+ (_attackMonsters[2] != -1 ? 1 : 0);
+
+	for (uint idx = 0; idx < (_combatParty.size() + monsCount); ++idx) {
 		if (!_charsGone[idx]) {
 			if (idx >= _combatParty.size()) {
 				return false;





More information about the Scummvm-git-logs mailing list