[Freeciv-Dev] Re: core file on civserver, http://civserver.freeciv.org/g
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 24, 2002 at 05:09:38PM -0700, freeciv@xxxxxxxxxxxxxxxxxxxxx wrote:
> # using $FREECIV_PATH
> /home/freeciv/.freeciv/code/installed/stable/freeciv-1.13.0+none/share/freeciv
> 366 struct city *old_pcity = player_find_city_by_id(pplayer,
> punit->homecity);
Relevant code for 1.13.0
1.224 (kauf 27-May-02): struct unit *punit =
player_find_unit_by_id(pplayer, req->unit_id);
1.224 (kauf 27-May-02): struct city *old_pcity =
player_find_city_by_id(pplayer, punit->homecity);
1.224 (kauf 27-May-02): struct city *new_pcity =
player_find_city_by_id(pplayer, req->city_id);
1.224 (kauf 27-May-02):
1.224 (kauf 27-May-02): if(!punit || !new_pcity) {
1.224 (kauf 27-May-02): return;
1.224 (kauf 27-May-02): }
As you see the test is after the access.
Current code:
1.224 (kauf 27-May-02): struct unit *punit =
player_find_unit_by_id(pplayer, req->unit_id);
1.231 (rfalke 10-Aug-02): struct city *old_pcity, *new_pcity =
1.231 (rfalke 10-Aug-02): player_find_city_by_id(pplayer,
req->city_id);
1.224 (kauf 27-May-02):
1.231 (rfalke 10-Aug-02): if (!punit || !new_pcity) {
1.231 (rfalke 10-Aug-02): return;
1.224 (kauf 27-May-02): }
1.231 (rfalke 10-Aug-02): old_pcity =
player_find_city_by_id(pplayer, punit->homecity);
No problem here.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: core file on civserver, http://civserver.freeciv.org/games/42492,
rf13 <=
|
|