Follow-up Comment #9, patch #3001 (project freeciv):
OK, don't think it's that store after all. Error continued to happen with
-O0. Think it's this in ruleset_load_traits():
for (tr = trait_begin(); trait_names[tr] != NULL && tr < trait_end(); tr =
trait_next(tr)) {
The specenum iterators produce trait_begin() == 0, trait_next(trait_begin())
== -1 (the specenum "invalid" value). So, this for look will try to read
trait_names[-1]. That's bad. (I don't think the tr<trait_end() condition would
work very well either.
Changing the line to
for (tr = trait_begin(); tr != trait_end() && trait_names[tr] != NULL; tr =
trait_next(tr)) {
works better for me. (No patch file as it's past my bedtime)
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3001>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev