Match tiPcKeyboard Base::setTranslateMode via uninit keyMode #1270

Merged
devin-ai-integration[bot] merged 1 commits from tiskb-clean into main 2026-10-08 22:06:00 +00:00

1 Commits

Author SHA1 Message Date
devin
fcd8b7f43f match(tiPcKeyboard): Base::setTranslateMode byte-identical
keyMode must be uninitialized: for mode outside {0,1,2} the switch
leaves it unset and retail provably reads the uninitialized register
(cmplw r31,r0 at 0xd6c executes with r31 never stored). Initializing
keyMode = mode changes the dispatch to an extra branch. Same accepted
uninitialized-read pattern as set_err_msg.

Also documents two probe results in tools/decomp-assist attempts files
(iplSetting scanAP inlined-bool materialization wall; tiString inputChar
indexed-store/dead-compare fossil).

Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-08 22:04:16 +00:00