From d0b941b0c528ae9a68b548c74638edb10b51970d Mon Sep 17 00:00:00 2001 From: HadeanLake Date: Fri, 6 Sep 2024 18:52:49 +0300 Subject: [PATCH] reset iid_furn inside if(!remaining) --- src/savegame_json.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 3c98b6769e3b2..8b120a490e5db 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -4921,9 +4921,9 @@ void submap::load( const JsonValue &jv, const std::string &member_name, int vers auto migrate_terstr = [&]( ter_str_id terstr ) { if( auto it = ter_migrations.find( terstr ); it != ter_migrations.end() ) { terstr = it->second.first; - if( it->second.second != furn_str_id::NULL_ID() ) { - iid_furn = it->second.second.id(); - } + iid_furn = it->second.second.id(); + } else { + iid_furn = furn_str_id::NULL_ID().id(); } if( terstr.is_valid() ) { iid_ter = terstr.id(); @@ -4950,9 +4950,6 @@ void submap::load( const JsonValue &jv, const std::string &member_name, int vers m->ter[i][j] = iid_ter; if( iid_furn ) { m->frn[i][j] = iid_furn; - if( !remaining ) { - iid_furn = furn_str_id::NULL_ID().id(); - } } } }