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

                 Summary: On new unit creation client copies transported_by
info to same place it reads it
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Fri 17 Aug 2012 04:06:03 AM EEST
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 

    _______________________________________________________

Details:

On creation of new unit (which is reusing existing unit structure by 'punit =
packet_unit')

packhand.c:1577:

    if (punit->client.transported_by != -1) {
      punit->client.transported_by = packet_unit->client.transported_by;
    }

So, if the punit (unit to be created) previously has transported_by field
other than -1 (=it is transported), it (unit to be created) information is set
from packet (which is actually same pointer)

I don't see how this could make any harm, but it should be removed anyway. Or
do I miss something? In which case checking old value of *punit* seems
suspicious.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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