Merge branch 'master' into 'master'

Fix a crash in the AI ManaPref checking code.

See merge request core-developers/forge!2987
This commit is contained in:
Michael Kamensky
2020-07-10 04:11:22 +00:00

View File

@@ -229,7 +229,7 @@ public class ComputerUtilMana {
});
final List<SpellAbility> finalAbilities = new ArrayList<>();
for (int i = 0; i < preferredShardAmount; i++) {
for (int i = 0; i < preferredShardAmount && i < prefSortedAbilities.size(); i++) {
finalAbilities.add(prefSortedAbilities.get(i));
}
for (int i = 0; i < otherSortedAbilities.size(); i++) {