URL:
  <http://gna.org/bugs/?20744>

                 Summary: Recursive wipe_unit() saving drowning units from
calling wipe_unit()
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Fri 19 Apr 2013 11:52:39 AM EEST
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.4.0, 2.5.0, 2.6.0

    _______________________________________________________

Details:

Haven't tried to setup test case, but when reading wipe_unit() refactoring
from patch #3804 (use unit lists to store drowning units instead of just
having count of them and then rechecking which units they are) it occurred to
me that recursively called wipe_unit() might handle those units calling
wipe_unit() has counted to its 'drowning' counter, meaning that the counter
value is not correct (in practice: counter instructs to wipe units as drowning
ones even after all have been saved)

Using the lists the way refactoring part of patch #3804 does avoids such
problems.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20744>

_______________________________________________
  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