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



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


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to