Author: sveinung
Date: Thu Oct  6 14:05:31 2016
New Revision: 34019

URL: http://svn.gna.org/viewcvs/freeciv?rev=34019&view=rev
Log:
savegame3: add all actions to order validation.

The unit action order target validation code didn't handle all actions. Have
it handle all currently existing actions. Make it object when a new action
is added but not handled.

See bug #25152

Modified:
    trunk/server/savegame3.c

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=34019&r1=34018&r2=34019&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Thu Oct  6 14:05:31 2016
@@ -5460,7 +5460,7 @@
                                                unitstr, j);
 
         if (order->order == ORDER_PERFORM_ACTION) {
-          switch (order->action) {
+          switch ((enum gen_action)order->action) {
           case ACTION_SPY_TARGETED_SABOTAGE_CITY:
             /* Sabotage target is production (-1) or a building. */
             if (!(order_tgt - 1 == -1
@@ -5506,6 +5506,15 @@
           case ACTION_NUKE:
           case ACTION_DESTROY_CITY:
           case ACTION_EXPEL_UNIT:
+          case ACTION_RECYCLE_UNIT:
+          case ACTION_DISBAND_UNIT:
+          case ACTION_HOME_CITY:
+          case ACTION_UPGRADE_UNIT:
+          case ACTION_PARADROP:
+          case ACTION_AIRLIFT:
+          case ACTION_ATTACK:
+          case ACTION_CONQUER_CITY:
+          case ACTION_HEAL_UNIT:
           case ACTION_COUNT:
             /* Target in order unsupported. */
 


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

Reply via email to