mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Gen9a: fix 2^32 solver end chunk search
uint cast, was an "exclusive range" so it truncated back to 0, immediately terminating the loop and not searching the highest-end of seeds. replace with tuple deconstruct so they stay as ulongs.
This commit is contained in:
parent
55f47f0f89
commit
f2ffca749f
|
|
@ -224,9 +224,7 @@ private static bool TryGetSeedNoPID(in GenerateParam9a param, PKM pk, out ulong
|
|||
{
|
||||
if (Volatile.Read(ref found)) { state.Stop(); return; }
|
||||
|
||||
uint start = (uint)range.start;
|
||||
uint endExclusive = (uint)range.end; // safe due to batching within 0..2^32
|
||||
|
||||
var (start, endExclusive) = range; // keep as ulong, can't overflow since endExclusive is at most 2^32
|
||||
for (ulong high = start; high < endExclusive; high++)
|
||||
{
|
||||
if (Volatile.Read(ref found)) { state.Stop(); return; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user