Author: sveinung
Date: Fri Sep 23 11:03:42 2016
New Revision: 33859

URL: http://svn.gna.org/viewcvs/freeciv?rev=33859&view=rev
Log:
rssanity: action min distance < max map size.

See patch #7714

Modified:
    trunk/server/rssanity.c

Modified: trunk/server/rssanity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rssanity.c?rev=33859&r1=33858&r2=33859&view=diff
==============================================================================
--- trunk/server/rssanity.c     (original)
+++ trunk/server/rssanity.c     Fri Sep 23 11:03:42 2016
@@ -908,6 +908,14 @@
       ok = FALSE;
     }
 
+    if (paction->min_distance > MAP_DISTANCE_MAX) {
+      ruleset_error(LOG_ERROR, "Action %s: min distance (%d) larger than "
+                               "any distance on a map can be (%d).",
+                    action_get_rule_name(act), paction->min_distance,
+                    MAP_DISTANCE_MAX);
+      ok = FALSE;
+    }
+
     if (paction->max_distance > ACTION_DISTANCE_MAX) {
       ruleset_error(LOG_ERROR, "Action %s: max distance is %d. "
                     "A map can't be that big.",


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

Reply via email to