1
0
mirror of synced 2025-01-31 12:13:49 +01:00

Improved disassembled output when setting register values.

This commit is contained in:
Jennifer Taylor 2021-05-22 21:52:40 +00:00
parent 8923c93a66
commit 212ff2be4e

View File

@ -2483,7 +2483,13 @@ class ByteCodeDecompiler(VerboseOutput):
# multiple statements.
set_value = stack.pop()
if action.preserve_stack:
stack.append(set_value)
# If we are only initializing one register, put the register back
# on the stack instead of the value, to make decompiled output
# better. This helps a lot when we initialize to a function call return.
if len(action.registers) == 1:
stack.append(action.registers[0])
else:
stack.append(set_value)
store_actions: List[StoreRegisterStatement] = []