Skip to content

Fix WIA hash exceptions in the last sector of a group - #38

Open
communism420 wants to merge 2 commits into
encounter:mainfrom
communism420:codex/fix-sector-63-hash-exceptions
Open

communism420 wants to merge 2 commits into
encounter:mainfrom
communism420:codex/fix-sector-63-hash-exceptions

Conversation

@communism420

Copy link
Copy Markdown

The exclusive hash-area boundary for sector 63 is 65536, which overflows u16. Use u32 for the comparison so the final sector's exceptions are retained.

The regression covers the first and last exception offsets, rebasing, and adjacent-sector filtering. Before the fix it panics in debug and returns no exceptions in release; after the fix it passes in both. All 16 library tests also pass in debug and release on Windows x64 (cargo test --locked -p nod --lib --target x86_64-pc-windows-msvc, with and without --release).

Prepared with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant