Author: cazfi
Date: Sat Aug 22 10:01:42 2015
New Revision: 29634

URL: http://svn.gna.org/viewcvs/freeciv?rev=29634&view=rev
Log:
Reworked sanity check about units that can't exist on tile without transport to 
give
more informative failure.

See bug #23801

Modified:
    branches/S2_6/server/sanitycheck.c

Modified: branches/S2_6/server/sanitycheck.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/sanitycheck.c?rev=29634&r1=29633&r2=29634&view=diff
==============================================================================
--- branches/S2_6/server/sanitycheck.c  (original)
+++ branches/S2_6/server/sanitycheck.c  Sat Aug 22 10:01:42 2015
@@ -400,9 +400,7 @@
       SANITY_CHECK(punit->hp > 0);
 
       /* Check for ground units in the ocean. */
-      if (!can_unit_exist_at_tile(punit, ptile)) {
-        SANITY_CHECK(ptrans != NULL);
-      }
+      SANITY_CHECK(can_unit_exist_at_tile(punit, ptile) || ptrans != NULL);
 
       /* Check for over-full transports. */
       SANITY_CHECK(get_transporter_occupancy(punit)


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

Reply via email to