From a317d38bf471c771cd21050e1edc13f779fa7358 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Mon, 16 May 2016 22:09:26 -0700 Subject: [PATCH] Fix Gen5 save file detection Thanks xtreme1! --- Misc/SAV5.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Misc/SAV5.cs b/Misc/SAV5.cs index 8cb3b8791..d2f675748 100644 --- a/Misc/SAV5.cs +++ b/Misc/SAV5.cs @@ -11,11 +11,11 @@ public class SAV5 : PKM internal static int getIsG5SAV(byte[] data) { - ushort chk1 = BitConverter.ToUInt16(data, SIZE1 - 0x100 + 0x94 + 0x10); - ushort actual1 = ccitt16(data.Skip(SIZE1 - 0x100).Take(0x94).ToArray()); + ushort chk1 = BitConverter.ToUInt16(data, SIZE1 - 0x100 + 0x8C + 0xE); + ushort actual1 = ccitt16(data.Skip(SIZE1 - 0x100).Take(0x8C).ToArray()); if (chk1 == actual1) return 0; - ushort chk2 = BitConverter.ToUInt16(data, SIZE2 - 0x100 + 0x94 + 0x10); + ushort chk2 = BitConverter.ToUInt16(data, SIZE2 - 0x100 + 0x94 + 0xE); ushort actual2 = ccitt16(data.Skip(SIZE2 - 0x100).Take(0x94).ToArray()); if (chk2 == actual2) return 1;