From 126d85c4665d724b2bea7579e99bbfc44e0163c9 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 17 Apr 2022 11:33:37 +0300 Subject: [PATCH 23/23] Accept resources lacking "extra" field only from 2.6 rulesets When loading a ruleset that is already supposed to be in 3.0 format, but with compat mode enabled (meaning that also 2.6 rulesets would have been accepted) resources lacking "extra" field were being accepted and converted like the ruleset was a 2.6 one. See osdn #44191 Signed-off-by: Marko Lindqvist --- server/ruleset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ruleset.c b/server/ruleset.c index 32d3e08ba9..9b0419c4db 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -2688,7 +2688,7 @@ static bool load_terrain_names(struct section_file *file, resource_name = secfile_lookup_str_default(file, NULL, "%s.extra", sec_name); if (resource_name == NULL) { - if (compat->compat_mode) { + if (compat->compat_mode && compat->ver_terrain < 10) { struct extra_type *pextra_res = rscompat_extra_from_resource_3_0(file, sec_name); if (pextra_res != NULL) { -- 2.35.1