Skip to content

Commit

Permalink
Merge pull request #42670 from Qrox/fix-save-loading
Browse files Browse the repository at this point in the history
Fix error when loading proficiencies from save
  • Loading branch information
ZhilkinSerg authored Aug 3, 2020
2 parents e851b61 + c2cb8d9 commit 782fe12
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,12 @@ void Character::load( const JsonObject &data )
data.read( "healthy_mod", healthy_mod );

// Remove check after 0.F
if( savegame_loading_version == 30 ) {
_proficiencies->deserialize_legacy( data.get_array( "proficiencies" ) );
} else if( savegame_loading_version > 30 ) {
data.read( "proficiencies", _proficiencies );
if( savegame_loading_version >= 30 ) {
if( data.has_array( "proficiencies" ) ) {
_proficiencies->deserialize_legacy( data.get_array( "proficiencies" ) );
} else {
data.read( "proficiencies", _proficiencies );
}
}


Expand Down

0 comments on commit 782fe12

Please sign in to comment.