Author: cazfi Date: Sun Feb 8 06:52:59 2015 New Revision: 28026 URL: http://svn.gna.org/viewcvs/freeciv?rev=28026&view=rev Log: Made worklist_copy() to copy only the required number of entries instead of max number.
See patch #5778 Modified: trunk/common/worklist.c Modified: trunk/common/worklist.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/worklist.c?rev=28026&r1=28025&r2=28026&view=diff ============================================================================== --- trunk/common/worklist.c (original) +++ trunk/common/worklist.c Sun Feb 8 06:52:59 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