Author: cazfi
Date: Sat Dec 26 20:54:47 2015
New Revision: 31222

URL: http://svn.gna.org/viewcvs/freeciv?rev=31222&view=rev
Log:
Also fc_assert package_city() citizen count sanity.

See patch #6694

Modified:
    trunk/server/citytools.c

Modified: trunk/server/citytools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/citytools.c?rev=31222&r1=31221&r2=31222&view=diff
==============================================================================
--- trunk/server/citytools.c    (original)
+++ trunk/server/citytools.c    Sat Dec 26 20:54:47 2015
@@ -2363,8 +2363,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

Reply via email to