Follow-up Comment #3, bug #17347 (project freeciv):

This is probably the numerical/string sorting heuristics in
client/cityrepdata.c (split_string(), etc) going wrong. You can certainly get
some funny effects by naming cities things like "0xDEADBEEF" or "3.14159".

I'd guess that it's to do with the "0377" notation for octal constants -- in
that case, "08" and "09" aren't valid numeric constants so will generate an
extra string.

This report is with 2.1.9, which predates the change from strtol() to
strtof() that I put in for plague in bug #15376, and strtol(_, _, 0) does
indeed parse these octal constant strings. I haven't checked the standards,
but the man page for strtof() on my system doesn't mention parsing of octal
(as opposed to 0xXXXX for hex).

So, I suspect this particular problem is specific to 2.1.x and won't affect
2.2.x or later. I haven't tested it, though.

It would probably be possible to fix this in 2.1.x, but it's not clear
whether there'll be abother release of that.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to