fix(ezitext): correct conversion table address return contract #1026

Merged
coah80 merged 1 commits from agent/bittle/conversion-contract-review into main 2026-10-03 02:49:31 +00:00
coah80 commented 2026-10-03 02:47:59 +00:00 (Migrated from github.com)

Definition-backed correction

Zi8GetTableAddress is defined in zaddress.c as returning ziU32, an encoded native table address. Correct zconvert.c's stale pointer-return declaration and make the three conversion-table pointer boundaries explicit. No packed table layout, helper implementation or shared header change.

Parent verification

  • Independently configured and ran full 43U all_source/report/progress/DOL
  • Compared all 1027 allocated objects and canonical relocations: unchanged; complete report unchanged
  • Unit remains 99.83696%, with three exact functions, 1380 exact code bytes and data 112/112
  • UC2Key remains 99.565216%; its real packed/native widths were already correct, so no unrelated source trial retained
  • Empty pool identical; base-relative diff and worktree checks pass

This is source-type correctness, not a percentage gain or a complete cross-library declaration cleanup. No linking/configuration, compiler flags, storage or metadata changes.

Base: 20ba34a80f
Tested tree: ef9c39ef68
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Fix Zi8GetTableAddress return type and add explicit casts in eZiText converters

  • Changes the local prototype of Zi8GetTableAddress in zconvert.c to return a 32-bit unsigned address type, matching the actual cross-unit definition.
  • Adds explicit pointer casts of the table-address result in Zi8ConvertUC2WC, Zi8ConvertWC2UC, and Zi8ConvertWC2Key before table access.
  • Adds an investigation record in allhands-ezitext-conversion-contract.attempts.md covering the packed table layouts and build verification.
  • Behavioral Change: only the declaration and the three pointer assignments changed; table layouts and read logic are unchanged.

Macroscope summarized 36d2471.

## Definition-backed correction Zi8GetTableAddress is defined in zaddress.c as returning ziU32, an encoded native table address. Correct zconvert.c's stale pointer-return declaration and make the three conversion-table pointer boundaries explicit. No packed table layout, helper implementation or shared header change. ## Parent verification - Independently configured and ran full 43U all_source/report/progress/DOL - Compared all 1027 allocated objects and canonical relocations: unchanged; complete report unchanged - Unit remains 99.83696%, with three exact functions, 1380 exact code bytes and data 112/112 - UC2Key remains 99.565216%; its real packed/native widths were already correct, so no unrelated source trial retained - Empty pool identical; base-relative diff and worktree checks pass This is source-type correctness, not a percentage gain or a complete cross-library declaration cleanup. No linking/configuration, compiler flags, storage or metadata changes. Base: 20ba34a80f9d0a09c4a8fad51352f0dd97d84be0 Tested tree: ef9c39ef684c012a6bdf8e6bdb3b00a8c6b11dbf DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- 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] > ### Fix `Zi8GetTableAddress` return type and add explicit casts in eZiText converters > - Changes the local prototype of `Zi8GetTableAddress` in [zconvert.c](https://github.com/coah80/wii-ipl/pull/1026/files#diff-c28d4e8345af12a15e02fb5eb27556dfdcb97e7ea86eaad1b9a52585ac17975f) to return a 32-bit unsigned address type, matching the actual cross-unit definition. > - Adds explicit pointer casts of the table-address result in `Zi8ConvertUC2WC`, `Zi8ConvertWC2UC`, and `Zi8ConvertWC2Key` before table access. > - Adds an investigation record in [allhands-ezitext-conversion-contract.attempts.md](https://github.com/coah80/wii-ipl/pull/1026/files#diff-d0aae21a61df32667bb3c6c22480f1837fee177eb195e8374703cfb1062209e5) covering the packed table layouts and build verification. > - Behavioral Change: only the declaration and the three pointer assignments changed; table layouts and read logic are unchanged. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 36d2471.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 02:49:27 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.