Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] (PR#3942) use NO_NATION_SELECTED properly
Home

[Freeciv-Dev] (PR#3942) use NO_NATION_SELECTED properly

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3942) use NO_NATION_SELECTED properly
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 6 Apr 2003 14:31:14 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen wrote:
> CVS is broken in two places.

...

> Second, whoever committed a nation index patch
> broke cvs too: whenever you create AI players and start the game it
> asserts. You just need to do
> 
>       create a
>       start
> 
> to reproduce.
> 
> 2: Loading rulesets
> 0: Bad nation id -1 (count 62) in get_nation_by_idx
> 0: wrong nation -1
> civserver: shared.c:662: die: Assertion `false' failed.

Patch attached.

This happened because another patch (the AI player class patch by 
Mateusz) was put in at about the same time as the original 
no_nation_selected patch.  It introduced another user that was never 
updated.

jason

Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.119
diff -u -r1.119 srv_main.c
--- server/srv_main.c   2003/04/04 15:47:50     1.119
+++ server/srv_main.c   2003/04/06 21:28:27
@@ -1110,7 +1110,7 @@
   struct nation_type* nation;
 
   players_iterate(pplayer) {
-    if (pplayer->nation == MAX_NUM_NATIONS) {
+    if (pplayer->nation == NO_NATION_SELECTED) {
       /* still undecided */
       continue;  
     }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] cvs broken, Per I. Mathisen, 2003/04/06
    • Message not available
      • [Freeciv-Dev] (PR#3942) use NO_NATION_SELECTED properly, Jason Short <=