From 267285992a311640d0d30e9aae5e4a72a4b01b31 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 12 Jan 2022 23:18:21 +0200 Subject: [PATCH 27/27] Accept transform_time > 0 when transform_result set in ruleset compat mode See osdn #43616 Signed-off-by: Marko Lindqvist --- server/ruleset.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/server/ruleset.c b/server/ruleset.c index 17cf754d8a..7fca50c4b7 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -3448,12 +3448,15 @@ static bool load_ruleset_terrain(struct section_file *file, ok = FALSE; break; } - if (compat->compat_mode && compat->ver_terrain < RSFORMAT_3_1 - && pterrain->transform_time <= 0) { - /* Transform time of zero was documented to disable the transform - * regardless of given transform result in earlier versions, i.e., - * having them inconsistent was not an error. */ - pterrain->transform_result = NULL; + if (compat->compat_mode && compat->ver_terrain < RSFORMAT_3_1) { + if (pterrain->transform_time <= 0) { + /* Transform time of zero was documented to disable the transform + * regardless of given transform result in earlier versions, i.e., + * having them inconsistent was not an error. */ + pterrain->transform_result = NULL; + } else if (pterrain->transform_result == NULL) { + pterrain->transform_time = 0; + } } if ((pterrain->transform_result != NULL && pterrain->transform_time <= 0) -- 2.34.1