From d78cde6468eb9f62137adbc03d437882088b97ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl>
Date: Sat, 24 Sep 2022 13:44:05 +0200
Subject: [PATCH] =?UTF-8?q?!OSDN=2045603:=20S=C5=82awomir=20Lach=20<slawek?=
 =?UTF-8?q?@lach.art.pl>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Stop saving "game.hardcoded_counters" + ensure game save will load after
this change.

diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c
index 4e5806ecbe..5c954b0a9e 100644
--- a/server/savegame/savecompat.c
+++ b/server/savegame/savecompat.c
@@ -2716,6 +2716,7 @@ static void compat_load_dev(struct loaddata *loading)
   if (game_version < 3019300) {
     /* Before version number bump to 3.1.93 */
 
+    (void) secfile_entry_lookup(loading->file, "game.hardcoded_counters");
   } /* Version < 3.1.93 */
 
 #endif /* FREECIV_DEV_SAVE_COMPAT_3_2 */
diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c
index 5d8cf08309..6e6a66484e 100644
--- a/server/savegame/savegame3.c
+++ b/server/savegame/savegame3.c
@@ -2674,9 +2674,6 @@ static void sg_save_counters(struct savedata *saving)
   count = counters_get_city_counters_count();
   countnames = fc_calloc(count, sizeof(*countnames));
 
-  secfile_insert_bool(saving->file, TRUE, "game.hardcoded_counters");
-
-
   secfile_insert_int(saving->file, count,
                      "savefile.city_counters_order_size");
 
-- 
2.37.3

