Author: sveinung
Date: Mon Mar 20 11:37:44 2017
New Revision: 35137

URL: http://svn.gna.org/viewcvs/freeciv?rev=35137&view=rev
Log:
Assert that value isn't ACTION_COUNT.

Add assertions to switch cases that shouldn't end up handling ACTION_COUNT.

See hrm Feature #645814

Modified:
    branches/S3_0/server/advisors/advdata.c
    branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/advisors/advdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/advisors/advdata.c?rev=35137&r1=35136&r2=35137&view=diff
==============================================================================
--- branches/S3_0/server/advisors/advdata.c     (original)
+++ branches/S3_0/server/advisors/advdata.c     Mon Mar 20 11:37:44 2017
@@ -894,6 +894,7 @@
 
           case ACTION_COUNT:
             /* Invalid */
+            fc_assert(act != ACTION_COUNT);
             break;
           }
         } action_iterate_end;

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35137&r1=35136&r2=35137&view=diff
==============================================================================
--- branches/S3_0/server/unithand.c     (original)
+++ branches/S3_0/server/unithand.c     Mon Mar 20 11:37:44 2017
@@ -602,6 +602,7 @@
     break;
   case ACTION_COUNT:
     /* Invalid. */
+    fc_assert(act != ACTION_COUNT);
     break;
   }
 


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

Reply via email to