From f2ffca749fa222bbd32a458df68c671381b29932 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 3 May 2026 00:55:13 -0500 Subject: [PATCH] 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. --- .../Legality/Encounters/Templates/Gen9a/LumioseSolver.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9a/LumioseSolver.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9a/LumioseSolver.cs index 61439a7bd..9d44da953 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9a/LumioseSolver.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9a/LumioseSolver.cs @@ -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; }