mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-16 00:58:01 +00:00
Add empty-pouch consideration
FF is beyond pouch size limits
This commit is contained in:
parent
8198bba01b
commit
08436babfa
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue