Skip to content

Commit

Permalink
Fix map deserialization error (CleverRaven#71860)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong authored Feb 20, 2024
1 parent 23e1442 commit 02c6967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5047,7 +5047,8 @@ void submap::load( const JsonValue &jv, const std::string &member_name, int vers
int faction_id = spawn_entry.next_int();
int mission_id = spawn_entry.next_int();
bool friendly = spawn_entry.next_bool();
std::string name = spawn_entry.next_string();
std::optional<std::string> name = std::nullopt;
spawn_entry.read_next( name );
if( spawn_entry.has_more() ) {
spawn_entry.throw_error( "Too many values for spawn" );
}
Expand Down

0 comments on commit 02c6967

Please sign in to comment.