diff --git a/AI/VCAI/Fuzzy.cpp b/AI/VCAI/Fuzzy.cpp index 0869c278a..c08787aa4 100644 --- a/AI/VCAI/Fuzzy.cpp +++ b/AI/VCAI/Fuzzy.cpp @@ -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(totalChance, 1); //avoid division by zero }