Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10983) Win32 server crash
Home

[Freeciv-Dev] (PR#10983) Win32 server crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: joshudson@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10983) Win32 server crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Nov 2004 13:34:03 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [jdorje - Thu Nov 11 22:59:43 2004]:
> 
> In fact all 
> unit_list_iterate calls should be changed to unit_list_iterate_safe. 
> Before 2.0.

Looking at things closer I'm not sure this is "safe" to do. 
unit_list_iterate_safe will skip any unit that is not in the game's unit
hash.  I think this could potentially cause problems with the client,
which may have such units.  For instance there's a hack when
investigating an enemy city where the supported and present units are in
that list, but are not entered into the game hash.

So I guess we just need to use unit_list_iterate_safe in this one place.
 However writing safe iteration needs to be a priority for 2.1.

jason




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