Branch: refs/heads/master
  Home:   https://github.com/Warzone2100/warzone2100
  Commit: 814d1527de2a22040b478afbaf840636b33a80e8
      
https://github.com/Warzone2100/warzone2100/commit/814d1527de2a22040b478afbaf840636b33a80e8
  Author: Cyp <c...@wz2100.net>
  Date:   2012-01-12 (Thu, 12 Jan 2012)

  Changed paths:
    M src/order.cpp

  Log Message:
  -----------
  Fix dead pointer cleanup in order lists, fixes desynch on manually picking up 
barrels.

Only a specific list of order types were cleaned up. The list did not contain
DORDER_RECOVER, so queueing oil barrel pickup would result in undefined 
behaviour
(which includes desynchs). Queueing pickup of the same oil barrel twice would
result in valgrind errors.

Now cleans up all dead pointers, without checking which type of order it is.

Introduced by allowing queueing DORDER_RECOVER in 
ade80e83c7e1b3eb9fc3da0207e908fb815885b0,
but it didn't really make sense to check the order type, since a dead pointer 
is a dead
pointer, independently of order type. Since the order queue no longer abuses a 
void * to
hold a BASE_OBJECT * or STRUCTURE_STATS * depending on order type, the check 
could be
removed.



------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Warzone2100-commits mailing list
Warzone2100-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/warzone2100-commits

Reply via email to