From cbc4878c875e52e83a41b67889a26366bbf68ef0 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Mon, 15 Feb 2021 19:05:51 +0100 Subject: [PATCH] save_bv_actions(): skip non enabled actions. Have rulesave skip saving non enabled actions when saving diplchance_initial_odds and move_is_blocked_by. See osdn #41585 --- tools/ruleutil/rulesave.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ruleutil/rulesave.c b/tools/ruleutil/rulesave.c index 2412ab20f6..99060e76d3 100644 --- a/tools/ruleutil/rulesave.c +++ b/tools/ruleutil/rulesave.c @@ -994,6 +994,12 @@ static bool save_bv_actions(struct section_file *sfile, int i = 0; action_iterate(act_id) { + if (action_enabler_list_size(action_enablers_for_action(act_id)) + == 0) { + /* Don't save value for actions that aren't enabled. */ + continue; + } + if (BV_ISSET(content, act_id)) { action_vec[i] = act_id; i++; -- 2.20.1