mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed CID 1288882
This commit is contained in:
parent
2ac72bf75b
commit
a86edca7d8
@ -219,7 +219,7 @@ ui64 FuzzyHelper::estimateBankDanger (const CBank * bank)
|
||||
totalStrength += config.second.totalStrength * config.first;
|
||||
totalChance += config.first;
|
||||
}
|
||||
return totalStrength / totalChance;
|
||||
return totalStrength / std::max<ui8>(totalChance, 1); //avoid division by zero
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user