Bug #86 ยป 0007-Fix-clang-analyzer-divide-by-zero-warning.patch
common/scriptcore/api_game_methods.c | ||
---|---|---|
citizens own = citizens_nation_get(self, inspirer->slot);
|
||
citizens total = city_size_get(self);
|
||
if ((own * 100 / total) >= game.info.citizen_partisans_pct) {
|
||
if (total > 0 && (own * 100 / total) >= game.info.citizen_partisans_pct) {
|
||
inspired = TRUE;
|
||
}
|
||
}
|