mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Break apart value fetch -> compare
easier to debug
This commit is contained in:
parent
fbd533092d
commit
b68e9472cb
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue