From 6196a8101ac1edd9be0f563b0d2f7985a1a1c308 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 20 Mar 2017 18:18:16 -0700 Subject: [PATCH] Fix C/XD pkm loading Thanks ArcticLoveBunny! --- PKHeX/PKM/PKMConverter.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PKHeX/PKM/PKMConverter.cs b/PKHeX/PKM/PKMConverter.cs index 251d27857..a4f52d232 100644 --- a/PKHeX/PKM/PKMConverter.cs +++ b/PKHeX/PKM/PKMConverter.cs @@ -300,6 +300,8 @@ public static void checkEncrypted(ref byte[] pkm) case 2: // no encryption return; case 3: + if (pkm.Length == PKX.SIZE_3CSTORED || pkm.Length == PKX.SIZE_3XSTORED) + return; // no encryption for C/XD ushort chk = 0; for (int i = 0x20; i < PKX.SIZE_3STORED; i += 2) chk += BitConverter.ToUInt16(pkm, i);