Skip to content

Commit

Permalink
Update bionics.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rtxyd authored Jan 22, 2024
1 parent ca66171 commit 1a6a1a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ void bionic_data::load_bionic_migration( const JsonObject &jo, const std::string
? bionic_id( jo.get_string( "to" ) )
: bionic_id::NULL_ID();
migrations.emplace( from, to );
// if delete bionics id before migration, cant migration
// if key showed once, and its null, delete previous null one
auto iter = migrations.find(from);
if (iter != migrations.end() && (*iter).second.is_null()) {
migrations.erase(iter);
}
}

void bionic_data::finalize_bionic()
Expand Down

0 comments on commit 1a6a1a7

Please sign in to comment.