Author: sveinung Date: Tue Mar 29 08:29:53 2016 New Revision: 32272 URL: http://svn.gna.org/viewcvs/freeciv?rev=32272&view=rev Log: Action probability checks aren't bool.
Make the action and target exists assertions return ACTPROB_IMPOSSIBLE rather than FALSE. See bug #24535 Modified: branches/S2_6/common/actions.c Modified: branches/S2_6/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.c?rev=32272&r1=32271&r2=32272&view=diff ============================================================================== --- branches/S2_6/common/actions.c (original) +++ branches/S2_6/common/actions.c Tue Mar 29 08:29:53 2016 @@ -1220,14 +1220,16 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(action_id), - FALSE, "Action %s is performed by %s not %s", + ACTPROB_IMPOSSIBLE, + "Action %s is performed by %s not %s", gen_action_name(action_id), action_actor_kind_name( action_get_actor_kind(action_id)), action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_CITY == action_get_target_kind(action_id), - FALSE, "Action %s is against %s not %s", + ACTPROB_IMPOSSIBLE, + "Action %s is against %s not %s", gen_action_name(action_id), action_target_kind_name( action_get_target_kind(action_id)), @@ -1262,14 +1264,16 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(action_id), - FALSE, "Action %s is performed by %s not %s", + ACTPROB_IMPOSSIBLE, + "Action %s is performed by %s not %s", gen_action_name(action_id), action_actor_kind_name( action_get_actor_kind(action_id)), action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_UNIT == action_get_target_kind(action_id), - FALSE, "Action %s is against %s not %s", + ACTPROB_IMPOSSIBLE, + "Action %s is against %s not %s", gen_action_name(action_id), action_target_kind_name( action_get_target_kind(action_id)), _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits