Author: cazfi Date: Sat Dec 26 20:54:52 2015 New Revision: 31223 URL: http://svn.gna.org/viewcvs/freeciv?rev=31223&view=rev Log: Also fc_assert package_city() citizen count sanity.
See patch #6694 Modified: branches/S2_6/server/citytools.c Modified: branches/S2_6/server/citytools.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/citytools.c?rev=31223&r1=31222&r2=31223&view=diff ============================================================================== --- branches/S2_6/server/citytools.c (original) +++ branches/S2_6/server/citytools.c Sat Dec 26 20:54:52 2015 @@ -2325,8 +2325,14 @@ } else { /* Note: If you get this error and try to debug the cause, you may find * using sanity_check_feelings() in some key points useful. */ + /* Have this as an fc_assert() first, so one can use '-F' to caught these in + * debugger. */ + fc_assert(packet->size == ppl); + + /* In all builds have an error message shown. */ log_error("City size %d, citizen count %d for %s", packet->size, ppl, city_name(pcity)); + /* Try to fix */ city_refresh(pcity); auto_arrange_workers(pcity); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits