[Freeciv-Dev] Re: Floating point exception
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
>
>Strange. Have you modified the ruleset?
>
Yes. I was experimenting with build_cost values of 0 and 1, and I'm playing
with the code. ;-).
Anyway, I solved my problem by adding 0.01 to the divisor:
original:
(attack + vuln * victim_count)
new:
(attack + vuln * victim_count + 0.01)
so there is no alteration of behavior in normal cases, and divisor will never
be zero.
|
|