Author: sveinung
Date: Fri May 12 14:56:54 2017
New Revision: 35520

URL: http://svn.gna.org/viewcvs/freeciv?rev=35520&view=rev
Log:
Initialize kind before use in check.

Initialize action not enabled explanation kind so it has a value to check
even if a suitable target is present.

Found with Valgrind.

See hrm Bug #659109

Modified:
    branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35520&r1=35519&r2=35520&view=diff
==============================================================================
--- branches/S3_0/server/unithand.c     (original)
+++ branches/S3_0/server/unithand.c     Fri May 12 14:56:54 2017
@@ -811,6 +811,9 @@
   bool can_exist = can_unit_exist_at_tile(punit, unit_tile(punit));
   bool on_native = is_native_tile(unit_type_get(punit), unit_tile(punit));
   int action_custom;
+
+  /* Not know yet. (Initialize before the below check.) */
+  explnat->kind = ANEK_UNKNOWN;
 
   if (action_id != ACTION_ANY) {
     /* A specific action should have a suitable target. */


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

Reply via email to