mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
XEEN: Fix setSpeedTable crash after missed ranged attack
This commit is contained in:
parent
5645d63acd
commit
0a20df9259
@ -1114,7 +1114,9 @@ void Combat::setSpeedTable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasSpeed) {
|
if (hasSpeed) {
|
||||||
if (_whosSpeed >= (int)_speedTable.size() || _speedTable[_whosSpeed] != oldSpeed) {
|
if (_speedTable.empty()) {
|
||||||
|
_whosSpeed = 0;
|
||||||
|
} else if (_whosSpeed >= (int)_speedTable.size() || _speedTable[_whosSpeed] != oldSpeed) {
|
||||||
for (_whosSpeed = 0; _whosSpeed < (int)charSpeeds.size(); ++_whosSpeed) {
|
for (_whosSpeed = 0; _whosSpeed < (int)charSpeeds.size(); ++_whosSpeed) {
|
||||||
if (oldSpeed == _speedTable[_whosSpeed])
|
if (oldSpeed == _speedTable[_whosSpeed])
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user