Author: cazfi
Date: Sun Feb  8 06:53:13 2015
New Revision: 28028

URL: http://svn.gna.org/viewcvs/freeciv?rev=28028&view=rev
Log:
Made worklist_copy() to copy only the required number of entries instead of max 
number.

See patch #5778

Modified:
    branches/S2_5/common/worklist.c

Modified: branches/S2_5/common/worklist.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/worklist.c?rev=28028&r1=28027&r2=28028&view=diff
==============================================================================
--- branches/S2_5/common/worklist.c     (original)
+++ branches/S2_5/common/worklist.c     Sun Feb  8 06:53:13 2015
@@ -111,8 +111,9 @@
 ****************************************************************/
 void worklist_copy(struct worklist *dst, const struct worklist *src)
 {
-  fc_assert_ret(sizeof(*dst) == sizeof(*src));
-  memcpy(dst, src, sizeof(*dst));
+  dst->length = src->length;
+
+  memcpy(dst->entries, src->entries, sizeof(struct universal) * src->length);
 }
 
 /****************************************************************


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

Reply via email to