mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Tweak detection of pk6 party file
This commit is contained in:
parent
1779420af1
commit
1e2ef19d9a
1 changed files with 5 additions and 4 deletions
|
@ -40,16 +40,17 @@ namespace PKHeX
|
|||
case PKX.SIZE_6PARTY: // collision with PGT, same size.
|
||||
if (BitConverter.ToUInt16(data, 0x4) != 0) // Bad Sanity?
|
||||
return -1;
|
||||
if (BitConverter.ToUInt32(data, 0x06) == PKX.getCHK(data))
|
||||
return 6;
|
||||
if (BitConverter.ToUInt16(data, 0x58) != 0) // Encrypted?
|
||||
{
|
||||
PKX.getCHK(data);
|
||||
for (int i = data.Length - 0x10; i < data.Length; i++) // 0x10 of 00's at the end != PK6
|
||||
if (data[i] != 0)
|
||||
break;
|
||||
return 6;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return 6;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
internal static PKM getPKMfromBytes(byte[] data, string ident = null)
|
||||
|
|
Loading…
Reference in a new issue