Skip to content

Commit

Permalink
reset iid_furn inside if(!remaining)
Browse files Browse the repository at this point in the history
  • Loading branch information
HadeanLake committed Sep 6, 2024
1 parent 2760521 commit d0b941b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
}
}
}
}
Expand Down

0 comments on commit d0b941b

Please sign in to comment.