[Freeciv-Dev] (PR#2650) Overflow in military_amortize
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2650) Overflow in military_amortize |
From: |
"Gregory Berkolaiko via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Thu, 26 Dec 2002 10:14:46 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
The expression in military_amortize() in aiunit.c
fully_amortized = ((value * simply_amortized) * 100
/ (MAX(1, value - simply_amortized))
/ (build_cost * MORT));
overflows on a regular basis.
This is rather damaging as can trun attractive objective / build into an
unattractive (negative) one.
G.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#2650) Overflow in military_amortize,
Gregory Berkolaiko via RT <=
|
|