Fix C/XD pkm loading

Thanks ArcticLoveBunny!
This commit is contained in:
Kurt 2017-03-20 18:18:16 -07:00
parent 92b39e9da5
commit 6196a8101a

View file

@ -300,6 +300,8 @@ namespace PKHeX.Core
case 2: // no encryption case 2: // no encryption
return; return;
case 3: case 3:
if (pkm.Length == PKX.SIZE_3CSTORED || pkm.Length == PKX.SIZE_3XSTORED)
return; // no encryption for C/XD
ushort chk = 0; ushort chk = 0;
for (int i = 0x20; i < PKX.SIZE_3STORED; i += 2) for (int i = 0x20; i < PKX.SIZE_3STORED; i += 2)
chk += BitConverter.ToUInt16(pkm, i); chk += BitConverter.ToUInt16(pkm, i);