Project

General

Profile

Bug #86 ยป 0007-Fix-clang-analyzer-divide-by-zero-warning.patch

Marko Lindqvist, 12/28/2023 11:46 PM

View differences:

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;
}
}
    (1-1/1)