URL:
<http://gna.org/bugs/?16431>
Summary: --Ppm colours players >32 randomly
Project: Freeciv
Submitted by: jtn
Submitted on: Saturday 08/14/10 at 18:50
Category: None
Severity: 2 - Minor
Priority: 5 - Normal
Status: Ready For Test
Assigned to: jtn
Originator Email:
Open/Closed: Open
Release: trunk
Discussion Lock: Any
Operating System: None
Planned Release: 2.3.0
_______________________________________________________
Details:
save_ppm() (triggered by the --Ppm server option) hasn't been fully updated
to cope with the expanded player limit on the trunk -- its colour array is
not initialised beyond 32 players, and it's not declared static, so it'll use
uninitialised garbage from the stack for the colours.
Attached is a patch which minimally fixes this by using modular arithmetic
(obviously the resulting colours won't be unique).
(There are other things that could do with being fixed about how save_ppm()
works. How free are we to change the format -- are there still scripts out
there that would need updating if we did?)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Saturday 08/14/10 at 18:50 Name: trunk-ppm-many-players.diff Size:
4kB By: jtn
trunk r17751: minimal patch for --Ppm to cope better with lots of players
<http://gna.org/bugs/download.php?file_id=9833>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?16431>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev