URL:
  <http://gna.org/patch/?2953>

                 Summary: Clean up identity_number()
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sun Sep  4 22:25:37 2011
                Category: general
                Priority: 5 - Normal
                  Status: In Progress
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.4.0

    _______________________________________________________

Details:

0 It assumes "unsigned short" will wrap at 16 bits when incremented. This is
true on x86_64 and probably i386, but it'll probably cause trouble for someone
-- I suspect it'd cause array overrun (in the unlikely event that more than
~65k units/cities are allocated).
0 It uses hand-rolled bitvectors rather than the BV_* stuff from bitvector.h
(which, incidentally, would probably have spotted the array overruns in debug
mode).

Testing:
* Tested roll-over from 65535.
* Tested an autogame to completion -- no change from unmodified trunk.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?2953>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to