Permit 0x1FF00 saves as stadium saves

Closes #3479
emulators are stupid
This commit is contained in:
Kurt 2022-04-13 10:42:35 -07:00
parent adcbc0221f
commit 5f4bbcf8de
3 changed files with 4 additions and 2 deletions

View file

@ -270,7 +270,7 @@ namespace PKHeX.Core
public static bool IsStadium(ReadOnlySpan<byte> data)
{
if (data.Length != SaveUtil.SIZE_G1STAD)
if (data.Length is not (SaveUtil.SIZE_G1STAD or SaveUtil.SIZE_G1STADF))
return false;
if (IsStadiumU(data))
return true;

View file

@ -177,7 +177,7 @@ namespace PKHeX.Core
public static bool IsStadium(ReadOnlySpan<byte> data)
{
if (data.Length != SaveUtil.SIZE_G2STAD)
if (data.Length is not (SaveUtil.SIZE_G2STAD or SaveUtil.SIZE_G2STADF))
return false;
return StadiumUtil.IsMagicPresentEither(data, TeamSize, MAGIC_FOOTER);
}

View file

@ -49,6 +49,7 @@ namespace PKHeX.Core
public const int SIZE_G3RAW = 0x20000;
public const int SIZE_G3RAWHALF = 0x10000;
public const int SIZE_G2STAD = 0x20000; // same as G3RAW_U
public const int SIZE_G2STADF = 0x1FF00;
public const int SIZE_G2RAW_U = 0x8000;
public const int SIZE_G2VC_U = 0x8010;
public const int SIZE_G2BAT_U = 0x802C;
@ -58,6 +59,7 @@ namespace PKHeX.Core
public const int SIZE_G2BAT_J = 0x1002C;
public const int SIZE_G2EMU_J = 0x10030;
public const int SIZE_G1STAD = 0x20000; // same as G3RAW_U
public const int SIZE_G1STADF = 0x1FF00;
public const int SIZE_G1STADJ = 0x8000; // same as G1RAW
public const int SIZE_G1RAW = 0x8000;
public const int SIZE_G1BAT = 0x802C;