Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9686) technology transfer = server crash
Home

[Freeciv-Dev] Re: (PR#9686) technology transfer = server crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeze@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9686) technology transfer = server crash
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Thu, 12 Aug 2004 10:23:17 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9686 >

freeze wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9686 >
> 
> CVS 10 Aug 2004
> Technology transfer from Ai (diplomacy or conquest of city) causes
> server crash. 
>   civserver: plrhand.c:280: found_new_tech: Assertion
> `plr->research.researching != (200-1)' failed.
> 

  Which kind of rulesets you used?

200-1 seems to be A_UNSET.

tech.h:

#define A_NONE 0
#define A_FIRST 1
#define A_LAST MAX_NUM_ITEMS
#define A_UNSET (A_LAST-1)
#define A_FUTURE (A_LAST-2)
#define A_NOINFO (A_LAST-3)

shared.h:

#define MAX_NUM_ITEMS   200     /* eg, unit_types */


  -> A_UNSET = 199, U_FUTURE = 198 and A_NOINFO = 197.

  On top of techs.ruleset is comment that it supports upto 199 techs


And finally I find where this limitation is checked.
ruleset.c, load_tech_names():

   if(num_techs + A_FIRST > A_LAST) {
     freelog(LOG_FATAL, "Too many advances (%d, max %d) (%s)",
            num_techs, A_LAST-A_FIRST, filename);
     exit(EXIT_FAILURE);
   }


  Are A_UNSET, A_FUTURE and A_NOINFO really required to be less than 
A_LAST or can we make them bigger?


  - Caz




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