fix(keyboard): declare KPRPutChar byte return #1044
Reference in New Issue
Block a user
Delete Branch "agent/bittle/kpr-return-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One-line source contract correction
The local KPRPutChar declaration in tiString.cpp says u32, while the actual SDK implementation returns u8 queue->oCount. Correct only the return declaration to u8; preserve both explicit &0xff masks and every argument/body.
The exact original callee is 74/74 instructions. Its sole normal return after OSRestoreInterrupts is lbz r3,0x10(r29) at function+0x10c. Both inputChar call sites pass queue/character in r3/r4 and narrow the byte result. No fuzzy gain is claimed.
Independent verification
Rebased on e58cd9e734b5b17759df9ddb29713eb9870ab092; tested tree
936eebc991.The remaining inputChar structural mismatch is unresolved. The wchar_t character spelling and separate tiInputForm declarations are outside this focused patch; wchar_t/u16 are both unsigned16-bit with compatible target ABI, but distinct C++ types. No linking flags changed.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.