mirror of
https://github.com/ProdigyReloaded/tbol-toolchain.git
synced 2026-11-28 14:38:11 -08:00
operand_int_val used atoi, so an empty-string comparison operand ('')
mapped to 0 and resolved to RET_OK (DEFINEd '0') -- both semantically
wrong and non-round-tripping ('' is 0 bytes, '0' is 1), shifting every
later offset (seen in QAPLTEXT 6.03.17). Only treat a string as a return
code when it round-trips through atoi (canonical decimal), so '' and '00'
no longer collide with '0'; real codes still resolve ('0'->RET_OK,
'10'->RET_SOME_ONES).
Adds decompiler_return_code_names (round-trip + resolution assertions)
over a new control fixture ret_codes.src.