Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)
Home

[Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: s.yeates@xxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Sep 2001 22:14:13 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Sep 12, 2001 at 09:03:18PM +0200, Gaute B Strokkenes wrote:
> On Wed, 12 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> > 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?
> 
> You have forgotten to take into account the places where
> city_population() is used other than the client, mainly in
> common/game.c.

No I haven't. score.literacy is divided by the population
later. Although I have to admit I haven't tested it.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "This is Linux Country. On a quiet night, you can hear Windows reboot."


[Prev in Thread] Current Thread [Next in Thread]