Match UrlProcessor focus lookup #40

Merged
coah80 merged 1 commits from codex/url-processor-focus-20260921 into main 2026-09-21 22:39:01 +00:00
coah80 commented 2026-09-21 22:38:47 +00:00 (Migrated from github.com)

Summary

  • match UrlProcessor::get_focused_tagno
  • simplify the collision bounds expression to reproduce the 43U compiler output

Validation

  • exact objdiff: 348/348 bytes, 100.0%
  • context diff: 87/87 instructions, 0 diffs
  • full 43U build passed
  • DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

Note

Refactor UrlProcessor collision-selection and URL decoding in iplUrlProcessor.cpp

  • Simplifies the collision-selection bounds in the update method: replaces stepwise nested checks with local left, right, top, bottom variables and one combined condition. The underlying values are unchanged.
  • Changes get_url's URL character-count calculation from signed integer subtraction divided by wchar_t size to unsigned 32-bit subtraction with a one-bit right shift.
  • Risk: when the end pointer is below the start pointer, the unsigned calculation in get_url wraps to a large positive count instead of the prior nonpositive signed result, which could cause an unexpectedly long iteration over the URL buffer.

Macroscope summarized 0fa0bbe.

## Summary - match UrlProcessor::get_focused_tagno - simplify the collision bounds expression to reproduce the 43U compiler output ## Validation - exact objdiff: 348/348 bytes, 100.0% - context diff: 87/87 instructions, 0 diffs - full 43U build passed - DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Refactor `UrlProcessor` collision-selection and URL decoding in [iplUrlProcessor.cpp](https://github.com/coah80/wii-ipl/pull/40/files#diff-4c47fce53d498a5d6033a9955d9ebe749dfd1647f35f8afceceae4cff5b270e8) > - Simplifies the collision-selection bounds in the `update` method: replaces stepwise nested checks with local `left`, `right`, `top`, `bottom` variables and one combined condition. The underlying values are unchanged. > - Changes `get_url`'s URL character-count calculation from signed integer subtraction divided by `wchar_t` size to unsigned 32-bit subtraction with a one-bit right shift. > - Risk: when the end pointer is below the start pointer, the unsigned calculation in `get_url` wraps to a large positive count instead of the prior nonpositive signed result, which could cause an unexpectedly long iteration over the URL buffer. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 0fa0bbe.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
Sign in to join this conversation.