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:
Kurt 2026-05-03 00:55:13 -05:00
parent 55f47f0f89
commit f2ffca749f

View File

@ -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; }