Match LetterWriter sendToPC #38

Merged
coah80 merged 1 commits from codex/letterwriter-sendtopc-20260921 into main 2026-09-21 22:27:35 +00:00
coah80 commented 2026-09-21 22:26:58 +00:00 (Migrated from github.com)

Summary

  • hoist the LetterWriter report string to the original lbl_816503CE + 0x4E base
  • reuse that pointer at each sendToPC error-report site

Verification

  • sendToPC: exact 111/111 instructions; ctxdiff reports diffs 0
  • pool_diff.py: identical, 15/15 strings
  • LetterWriter exact code: 4,176 -> 4,620 bytes; exact functions: 28/31 -> 29/31
  • full 43U build passed
  • DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

Scope is limited to src/scene/letterWriter/iplLetterWriter.cpp.

Note

Match sendToPC report-string offsets in LetterWriter

Routes the five diagnostic OSReport calls in iplLetterWriter.cpp through a local base pointer at lbl_816503CE + 0x4E. The effective format-string addresses shift by 0x4E relative to the previous direct offsets. The NWC24 success and error return paths are unchanged.

📊 Macroscope summarized 676712c. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted

🗂️ Filtered Issues

## Summary - hoist the LetterWriter report string to the original `lbl_816503CE + 0x4E` base - reuse that pointer at each `sendToPC` error-report site ## Verification - `sendToPC`: exact 111/111 instructions; `ctxdiff` reports `diffs 0` - `pool_diff.py`: identical, 15/15 strings - LetterWriter exact code: 4,176 -> 4,620 bytes; exact functions: 28/31 -> 29/31 - full 43U build passed - DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d` Scope is limited to `src/scene/letterWriter/iplLetterWriter.cpp`. <!-- 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] > ### Match `sendToPC` report-string offsets in `LetterWriter` > Routes the five diagnostic `OSReport` calls in [iplLetterWriter.cpp](https://github.com/coah80/wii-ipl/pull/38/files#diff-008cc6505bc8450fa2f0cc8be68b6630a4545a36f5413646d3b6789925210bf2) through a local base pointer at `lbl_816503CE + 0x4E`. The effective format-string addresses shift by 0x4E relative to the previous direct offsets. The NWC24 success and error return paths are unchanged. > > <!-- Macroscope's review summary starts here --> > > <details> > <summary>📊 <a href="https://app.macroscope.com">Macroscope</a> summarized 676712c. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted</summary> > > ### 🗂️ Filtered Issues > > </details><!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
macroscopeapp[bot] (Migrated from github.com) reviewed 2026-09-21 22:28:30 +00:00
macroscopeapp[bot] (Migrated from github.com) left a comment
No description provided.
<!-- macroscope-meta: {"kind":"code_review","variant":"195358a06841b2d4d03feb0d212d1ca7"} -->
@@ -557,32 +557,33 @@ namespace ipl {
int LetterWriter::sendToPC(NWC24UserId userId, const wchar_t* wcString) {
NWC24MsgObj msgObj;
macroscopeapp[bot] (Migrated from github.com) commented 2026-09-21 22:28:29 +00:00

🟠 High letterWriter/iplLetterWriter.cpp:559

The successful address setup path reads past lbl_816503CE and can crash: report + 0xEB resolves to lbl_816503CE + 0x139, beyond its declared 0x12A bytes. Because report already starts at offset 0x4E, the other calls also select incorrect diagnostic strings; use the original base pointer for these offsets or adjust every offset relative to report.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @src/scene/letterWriter/iplLetterWriter.cpp around line 559:

The successful address setup path reads past `lbl_816503CE` and can crash: `report + 0xEB` resolves to `lbl_816503CE + 0x139`, beyond its declared `0x12A` bytes. Because `report` already starts at offset `0x4E`, the other calls also select incorrect diagnostic strings; use the original base pointer for these offsets or adjust every offset relative to `report`.
🟠 **High** `letterWriter/iplLetterWriter.cpp:559` The successful address setup path reads past `lbl_816503CE` and can crash: `report + 0xEB` resolves to `lbl_816503CE + 0x139`, beyond its declared `0x12A` bytes. Because `report` already starts at offset `0x4E`, the other calls also select incorrect diagnostic strings; use the original base pointer for these offsets or adjust every offset relative to `report`. <details> <summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary> ```text In file @src/scene/letterWriter/iplLetterWriter.cpp around line 559: The successful address setup path reads past `lbl_816503CE` and can crash: `report + 0xEB` resolves to `lbl_816503CE + 0x139`, beyond its declared `0x12A` bytes. Because `report` already starts at offset `0x4E`, the other calls also select incorrect diagnostic strings; use the original base pointer for these offsets or adjust every offset relative to `report`. ``` </details> <!-- macroscope-meta: {"kind":"code_review","variant":"195358a06841b2d4d03feb0d212d1ca7"} -->
Sign in to join this conversation.