Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10299) Clients, base_total_bulbs_required() and A_UNSE
Home

[Freeciv-Dev] (PR#10299) Clients, base_total_bulbs_required() and A_UNSE

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10299) Clients, base_total_bulbs_required() and A_UNSET
From: "Egor Vyscrebentsov via RT" <evyscr@xxxxxxxxx>
Date: Fri, 24 Sep 2004 06:55:41 -0700
Reply-to: RT_CorrespondAddressNotSet@xxxxxxxxxxxxxx

<URL: http://RT::WebBaseURL.not.configured:80/Ticket/Display.html?id=10299 >

Good daytime! 
 
While challenge #9779 (and #9780), i have found follow: 
 
In server/savegame.c (player_load() function) we are allowed to set 
research.researching to A_UNSET (L1620-1626). 
Clients call functions total_bulbs_required() with research.researching in 
gui-xxx/plrdlg.c (create_player_dialog()). 
 
base_total_bulbs_required() doesn't check its parameter for A_UNSET in 
beginning of function. 
In (common/tech.c#389) we call get_invention(), which has line 
(common/tech.c#55): 
  assert(tech >= 0 || tech < game.num_tech_types); 
 
Am i right that this might cause client to segfault? 
 
Thanks, evyscr. 


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10299) Clients, base_total_bulbs_required() and A_UNSET, Egor Vyscrebentsov via RT <=