mirror of
https://github.com/ModOrganizer2/modorganizer-game_oblivion.git
synced 2026-07-27 14:00:16 -07:00
Save files with no image are valid but break the parser (#26)
This commit is contained in:
@@ -64,9 +64,11 @@ std::unique_ptr<GamebryoSaveGame::DataFields> OblivionSaveGame::fetchDataFields(
|
||||
|
||||
// Note that screenshot size, width, height and data are apparently the same
|
||||
// structure
|
||||
file.skip<unsigned long>(); // Screenshot size.
|
||||
|
||||
fields->Screenshot = file.readImage();
|
||||
unsigned long imageSize;
|
||||
file.read(imageSize); // Screenshot size.
|
||||
if (imageSize > 0) {
|
||||
fields->Screenshot = file.readImage();
|
||||
}
|
||||
|
||||
fields->Plugins = file.readPlugins();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user