From caeebac22777998632bf8a6ecbb87915d07d02b3 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 10 Dec 2022 17:33:40 +0200 Subject: [PATCH] rscompat: Register cleaning action enables to correct actions Fixes ruleset resaving error seen on CI See osdn #46243 Signed-off-by: Marko Lindqvist --- server/rscompat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/rscompat.c b/server/rscompat.c index b30751a4d2..ae6a23978e 100644 --- a/server/rscompat.c +++ b/server/rscompat.c @@ -380,24 +380,28 @@ void rscompat_postprocess(struct rscompat_info *info) if (ae->action == ACTION_CLEAN_POLLUTION) { /* TODO: Stop making the copy to preserve enabler for * the original action. */ - action_enabler_add(action_enabler_copy(ae)); + struct action_enabler *copy = action_enabler_copy(ae); - ae->action = ACTION_CLEAN; - requirement_vector_append(&ae->target_reqs, + copy->action = ACTION_CLEAN; + requirement_vector_append(©->target_reqs, req_from_str("ExtraFlag", "Local", FALSE, TRUE, TRUE, "CleanAsPollution")); + + action_enabler_add(copy); } if (ae->action == ACTION_CLEAN_FALLOUT) { /* TODO: Stop making the copy to preserve enabler for * the original action. */ - action_enabler_add(action_enabler_copy(ae)); + struct action_enabler *copy = action_enabler_copy(ae); - ae->action = ACTION_CLEAN; - requirement_vector_append(&ae->target_reqs, + copy->action = ACTION_CLEAN; + requirement_vector_append(©->target_reqs, req_from_str("ExtraFlag", "Local", FALSE, TRUE, TRUE, "CleanAsFallout")); + + action_enabler_add(copy); } } action_enablers_iterate_end; -- 2.35.1