URL:
<http://gna.org/bugs/?23564>
Summary: Traits loading from savefile broken
Project: Freeciv
Submitted by: jtn
Submitted on: Sat 02 May 2015 20:05:44 BST
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release: 2.5.0
Discussion Lock: Any
Operating System: None
Planned Release: 2.5.1, 2.6.0, 3.0.0
_______________________________________________________
Details:
Trying for a quick fix to bug #23561 I found a number of issues. Looks like
loading traits from a savefile doesn't work at all.
* sg_load_player_main() sets traits even though I think ai_traits_init() has
not yet been called, so will dereference a NULL pplayer->ai_common.traits
pointer
* later, sg_load_players() unconditionally calls ai_traits_init() (in the loop
talking about NO_NATION_SELECTED), which would clobber anything that was
loaded from the savefile
* but we don't hit the NULL dereference because the code loading traits is not
looking in the right place in the savefile: it looks for "plr%d.<stuff>" where
the save file contains "player%d.<stuff>" (so it never gets as far as trying
to write through the pointer)
** the migration code added in patch #6027 has the same issue
* said migration code misspells "plr" as "pĺr" in one place (note non-ASCII
character)
At least some of these issues affect S2_5 on a quick look.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23564>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev