mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 03:53:08 +00:00
Fix array reference
GC strings are 22 bytes long, but GBA strings are 10 & 7 bytes long. If a 7-char OT name is generated in C/XD and transferred, it would try iterating to the 8th char which is OOB for dest. Iterate over the smaller array, which is always dest (in this method).
This commit is contained in:
parent
7632230edf
commit
1dc94152c3
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ public static class StringConverter3GC
|
|||
|
||||
var table = jpn ? CharTableJPN : CharTableINT;
|
||||
int i = 0;
|
||||
for (; i < data.Length; i++)
|
||||
for (; i < dest.Length; i++)
|
||||
{
|
||||
var c = (char)ReadUInt16BigEndian(data[(i * 2)..]);
|
||||
if (c == TerminatorBigEndian)
|
||||
|
|
Loading…
Reference in a new issue