Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] Re: (PR#15624) Crash in ruleset without EFT_EMPIRE_SIZE_ST
Home

[Freeciv-Dev] Re: (PR#15624) Crash in ruleset without EFT_EMPIRE_SIZE_ST

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#15624) Crash in ruleset without EFT_EMPIRE_SIZE_STEP
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 19 Feb 2006 04:00:40 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15624 >

On Sun, 19 Feb 2006, Marko Lindqvist wrote:
> Shouldn't ruleset without empire size step effects work?

Yes. Oops. Patch.

  - Per

Index: ai/aicity.c
===================================================================
--- ai/aicity.c (revision 11621)
+++ ai/aicity.c (working copy)
@@ -359,7 +359,7 @@
          > get_player_bonus(pplayer, EFT_EMPIRE_SIZE_BASE)) {
        if (get_player_bonus(pplayer, EFT_EMPIRE_SIZE_BASE) > 0) {
          factor += city_list_size(pplayer->cities) 
-           / get_player_bonus(pplayer, EFT_EMPIRE_SIZE_STEP);
+           / MAX(get_player_bonus(pplayer, EFT_EMPIRE_SIZE_STEP), 1);
        }
        factor += 2;
       }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#15624) Crash in ruleset without EFT_EMPIRE_SIZE_STEP, Per I. Mathisen <=