Fix pk3 marking overflow issue

Closes #1062
Closes #1047
For those affected, use the batch editor to edit MarkValue from 255 to
0.

=MarkValue=255
.MarkValue=0
This commit is contained in:
Kurt 2017-04-20 20:37:08 -07:00
parent 346a9c9d4f
commit 0506359c41

View file

@ -1378,6 +1378,8 @@ namespace PKHeX.Core
}
if (strdata.Length > 0)
strdata[strdata.Length - 1] = 0xFF;
if (strdata.Length > maxLength)
Array.Resize(ref strdata, maxLength);
if (strdata.Length < padTo)
{
int start = strdata.Length;