From c2cb8d9fe818784ccb9fb992e8403d93f1008604 Mon Sep 17 00:00:00 2001 From: Qrox Date: Mon, 3 Aug 2020 21:13:07 +0800 Subject: [PATCH] Fix error on loading save --- src/savegame_json.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 8936e0f99925e..f35a2cdde44e2 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -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 ); + } }