decomp: preserve CHANSVm string-load deletion errors #963
Reference in New Issue
Block a user
Delete Branch "agent/bittle/chansvm-string-error"
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?
Decompilation correction
Under the requested decompilation-first phase, this fixes a real CHANSVmStep behavior mismatch without claiming a newly exact function or native linking gain.
LOAD_STRING_CONST previously overwrote every CHANSVmDeleteObject failure with CHANS_VM_ERR_LOAD_STRING_CONST (-945). The target preserves a deletion failure and only returns -945 when deletion succeeded but the constant index/payload is invalid. A scoped loadResult and normal conditional merge now preserve those paths. No headers, linking flags, symbols, splits, data, or assembly changed.
Target evidence independently checked
CHANSVmStep-relative offsets: +0x9fc calls DeleteObject; +0xa04 branches directly to +0xa64 on nonzero return; +0xa64 preserves r3. Invalid string checks at +0xa24/+0xa38 alone select -945 at +0xa3c. Source-extracted host C tests passed six cases (missing operand, deletion failure with valid/invalid index, invalid index, null payload, success). This is a stubbed behavior harness, not Wii runtime execution.
Fresh rebased validation on
d725e023No register/volatile forcing, fabricated padding, uninitialized values, retail assembly transplant or score redefinition. Twelve CHANSVm functions remain non-exact. Left for review; no merge performed.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.