Skip to content

Commit

Permalink
Add version check to parse medium plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Jun 11, 2024
1 parent 6eb6244 commit 379c0e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/starfieldsavegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ std::unique_ptr<GamebryoSaveGame::DataFields> StarfieldSaveGame::fetchDataFields
QString ignore;
std::unique_ptr<DataFields> fields = std::make_unique<DataFields>();

uint8_t saveGameVersion = file.readChar(12);
file.readChar(12);
file.read(ignore); // game version
file.read(ignore); // game version again?
file.readInt(); // plugin info size

fields->Plugins = file.readPlugins(0, extraInfo, gamePlugins);
fields->LightPlugins = file.readLightPlugins(0, extraInfo, gamePlugins);
fields->MediumPlugins = file.readMediumPlugins(0, extraInfo, gamePlugins);
if (saveVersion >= 122)
fields->MediumPlugins = file.readMediumPlugins(0, extraInfo, gamePlugins);
file.closeCompressedData();
file.close();

Expand Down

0 comments on commit 379c0e0

Please sign in to comment.