Author: sveinung Date: Wed Mar 22 12:02:02 2017 New Revision: 35143 URL: http://svn.gna.org/viewcvs/freeciv?rev=35143&view=rev Log: act_prob_cache size is ruleset number of actions.
The action probabilities are copied into it using action_iterate. It will therefore never have to hold more than NUM_ACTIONS actions. This change can therefore go in before Freeciv stops transferring action probabilities for non existing actions after actions have been made generic. See hrm Feature #646167 Modified: trunk/client/climisc.c Modified: trunk/client/climisc.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/climisc.c?rev=35143&r1=35142&r2=35143&view=diff ============================================================================== --- trunk/client/climisc.c (original) +++ trunk/client/climisc.c Wed Mar 22 12:02:02 2017 @@ -1219,7 +1219,7 @@ fc_assert_ret(punit->client.act_prob_cache == NULL); punit->client.act_prob_cache = (struct act_prob*)fc_malloc( - ACTION_COUNT * sizeof(*punit->client.act_prob_cache)); + NUM_ACTIONS * sizeof(*punit->client.act_prob_cache)); } /**************************************************************************** _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits