Break apart value fetch -> compare

easier to debug
This commit is contained in:
Kurt 2020-03-12 15:05:59 -07:00
parent fbd533092d
commit b68e9472cb

View file

@ -165,7 +165,9 @@ namespace PKHeX.Core
private static int GetActiveBlockViaCounter(byte[] data, int begin, int length)
{
int ofs = GetBlockSaveCounterOffset(begin, length);
bool first = BitConverter.ToUInt16(data, ofs) >= BitConverter.ToUInt16(data, ofs + PartitionSize);
var block0 = BitConverter.ToUInt16(data, ofs);
var block1 = BitConverter.ToUInt16(data, ofs + PartitionSize);
bool first = block0 >= block1;
return first ? 0 : 1;
}