[Freeciv-Dev] [Patch] Population counter overflow (PR#954)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 11, 2001 at 09:01:23PM +0200, Raimar Falke wrote:
> On Wed, Sep 12, 2001 at 06:51:28AM +1200, <s.yeates@xxxxxxxxxxxxxxxx> wrote:
> > > On Mon, Sep 10, 2001 at 01:48:17PM -0700, s.yeates@xxxxxxxxxxxxxxxx wrote:
> > > > Full_Name: stuart yeates
> > > > Version: 1.11.4
> > > > Distribution: Built from source
> > > > Client: Gtk+
> > > > OS: Linux
> > > > Submission from: (NULL) (130.217.76.32)
> > > >
> > > >
> > > > The population counter overflows for very large populations
> > >
> > > If I assume that sizeof(int)==4 on your system you need a population
> > > over 2,000,000,000 to wrap the counter around. A city of size 30 has
> > > 4650,000 citizen. You would need about 430 cities for this. Do you
> > > really has such a huge empire?
> >
> > I've pretty much tiled the map with cities and then railroaded the lot. So
> > yes, I have really encountered this issue.
>
> We could change the return value from city_population from citizens to
> thousand of citizens.
A patch which should fix this is attached. Can you test it please?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"From what I am reading Win98 and NT5.0 will be getting rid of all that
crap anyway. Seems that Microsoft has invented something called TCP/IP and
another really revolutionary concept called DNS that eliminates the
netbios crap too. All that arping from browsers is going to go away.
I also hear rumors that they are on the verge of breakthrough discoveries
called NFS, and LPD too. Given enough time and money, they might
eventually invent Unix."
-- George Bonser in linux-kernel
int_to_text1.diff
Description: Text document
- [Freeciv-Dev] Population counter overflow (PR#954), s . yeates, 2001/09/10
- [Freeciv-Dev] Re: Population counter overflow (PR#954), Raimar Falke, 2001/09/11
- [Freeciv-Dev] Re: Population counter overflow (PR#954), Mike Kaufman, 2001/09/11
- [Freeciv-Dev] Re: Population counter overflow (PR#954), <s.yeates@xxxxxxxxxxxxxxxx>, 2001/09/11
- [Freeciv-Dev] Re: Population counter overflow (PR#954), Raimar Falke, 2001/09/11
- [Freeciv-Dev] [Patch] Population counter overflow (PR#954),
Raimar Falke <=
- [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954), Raimar Falke, 2001/09/12
- [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954), Gaute B Strokkenes, 2001/09/12
- [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954), Raimar Falke, 2001/09/12
- [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954), Gaute B Strokkenes, 2001/09/12
- [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954), Raimar Falke, 2001/09/13
|
|