Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very
Home

[Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx, per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very dangerous
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 31 Dec 2004 12:52:34 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [jdorje - Thu Dec 09 06:58:48 2004]:
> 
> I'm not sure how much of a problem this really is.
> 
> cm_query_result seems in my tests to not change any of the city fields
> (except for refreshing).  I'm not quite sure how this is, so maybe I'm
> mistaken.

It's because I always make a shallow copy of the city before touching it, and I 
restore the 
shallow copy at the end (look at apply_solution and init_min_production).  I'd 
run in to the 
problem in init_min_production, according to the comment in that function.

Looks like your patch changes the behaviour.  Probably we should make one copy, 
store it in 
the cm_state, and restore it at the end.



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