Add empty-pouch consideration

FF is beyond pouch size limits
This commit is contained in:
Kurt 2017-02-21 19:45:08 -08:00
parent 8198bba01b
commit 08436babfa

View file

@ -175,6 +175,8 @@ namespace PKHeX.Core
else
{
int numStored = Data[Offset];
if (numStored > PouchDataSize) // uninitialized yellow (0xFF), sanity check for out-of-bounds values
numStored = 0;
for (int i = 0; i < numStored; i++)
{
switch (Type)