Project

General

Profile

Bug #2012 » 0010-AI-Fix-floating-point-exception-at-air-unit-handling.patch

Marko Lindqvist, 05/03/2026 08:00 PM

View differences:

ai/default/aiair.c
recov = get_unit_bonus(punit, EFT_UNIT_RECOVER);
if (lost_hp - recov <= 0) {
res = 0;
} else {
} else if (recov + regen > 0) {
res = 1 + (lost_hp - recov) / (recov + regen);
} else {
return MAX_UINT32;
}
punit->tile = real_tile;
(2-2/2)