mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 10:55:58 -05:00
Break apart value fetch -> compare
easier to debug
This commit is contained in:
@@ -165,7 +165,9 @@ private static int GetActiveBlock(byte[] data, int begin, int length)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user