Support for loading 0.9.x.x beta saves

This commit is contained in:
Alula 2024-03-08 01:39:48 +01:00
parent 6c9b4d9a54
commit 7f33f7b6c8
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
1 changed files with 3 additions and 2 deletions

View File

@ -315,8 +315,9 @@ impl GameProfile {
}
pub fn load_from_save<R: io::Read>(mut data: R) -> GameResult<GameProfile> {
// Do041220
if data.read_u64::<BE>()? != 0x446f303431323230 {
let magic = data.read_u64::<BE>()?;
// Do041220, Do041115
if magic != 0x446f303431323230 && magic != 0x446f303431313135 {
return Err(ResourceLoadError("Invalid magic".to_owned()));
}