1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-21 21:22:44 +00:00

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

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()));
}