Bug #2012 » 0010-AI-Fix-floating-point-exception-at-air-unit-handling.patch
| 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;
|
||
- « Previous
- 1
- 2
- Next »