From 0db1deb301905d59944bb3f9d7e9c90aa72dbf33 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 14 Dec 2022 01:21:27 +0200 Subject: [PATCH 28/28] savecompat: Do not add routes_max_length to savegame2.c saves See osdn #46187 Signed-off-by: Marko Lindqvist --- server/savegame/savecompat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c index c414e5c0f3..61be376c39 100644 --- a/server/savegame/savecompat.c +++ b/server/savegame/savecompat.c @@ -2256,8 +2256,11 @@ static void compat_load_030200(struct loaddata *loading, secfile_insert_int(loading->file, wlist_max_length, "player%d.wl_max_length", plrno); - secfile_insert_int(loading->file, MAX_TRADE_ROUTES_OLD, - "player%d.routes_max_length", plrno); + + if (format_class == SAVEGAME_3) { + secfile_insert_int(loading->file, MAX_TRADE_ROUTES_OLD, + "player%d.routes_max_length", plrno); + } } player_slots_iterate_end; } -- 2.35.1