Follow-up Comment #1, bug #19836 (project freeciv):
> I'm not quite sure of the purpose of these _size entries
OK, looking closer, improvement/technology/bases_size > 0 are used to gate
calls to secfile_lookup_str_vec(), which would return an error on a
zero-length vector. For some reason specials are not gated in this way
(probably we never thought we'd have no specials defined in a savegame).
This arrangement hasn't changed since savegame2.c was introduced (patch
#1541). The old format in savegame.c mostly uses capabilities to gate loading
of these string vectors (except for bases).
It would be possible to rejig secfile_lookup_str_vec() to optionally allow
zero-length arrays, and thus get rid of these redundant entries in the
savefile. I'm tempted to do this on trunk. On stable branches I think we
should just fix loading to use specials_size to remove the warning.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list