You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain exit.i-instructions seem to be ignored when decompiling (possibly only when it is the only content of an is-else block, and possible only when the condition uses short-circuit operations?).
Making another change in the decompiled code and recompiling it will case the exit.i to then disappear from the disassembly, and the script to malfunction. Manually adding exit to the empty block and recompiling will have it immediately disappear again (due to decompiling again) but the exit.i instruction to return to the disassembly. This implies it should have probably been decompiled as:
if (openingstate < 3 || blackalpha > 0)
{
exit
}
(or similar)
Also note that near the end of that code, return; is placed in the decompiled code (due to an exit.i instruction at the end of the disassembly), but the GML manual says that that's only valid within functions. That should probably be exit instead?
I noticed this with the game Tribal Hunter, in the code gml_Object_menu_title_Step_0. There are other places where exit.i instructions seem to be ignored in that same code as well.
Reproducing steps
Open the data.win for Tribal Hunter
Open gml_Object_menu_title_Step_0 under code.
Observe empty if statements.
Switch to the disassembly tab and look for the disassembly for those statements.
Observe exit.i instructions that are ignored.
Setup Details
UndertaleModTool v0.5.1.0, git d40d7a0 (latest nightly as of this report)
Windows 11 (arm64)
Tribal Hunter 1.0.0.8 (latest Steam release). The game has a free demo, but I don't know if it also appears there as I no longer have access to it (I remember it's title screen to be nearly identical to the full version so probably?). It is also available on GOG. Note that the game is technically SFW, but can be considered fetishy in nature.
The text was updated successfully, but these errors were encountered:
oh, you are kidding me. This issue is almost certainly caused by #1191, which I created to solve the opposite problem (removing returns during re-compilation). Specifically the change to Decompiler.cs.
Describe the bug
Certain
exit.i
-instructions seem to be ignored when decompiling (possibly only when it is the only content of an is-else block, and possible only when the condition uses short-circuit operations?).For example, the following disassembly:
Decompiled into an empty if statement:
Making another change in the decompiled code and recompiling it will case the
exit.i
to then disappear from the disassembly, and the script to malfunction. Manually addingexit
to the empty block and recompiling will have it immediately disappear again (due to decompiling again) but theexit.i
instruction to return to the disassembly. This implies it should have probably been decompiled as:(or similar)
Also note that near the end of that code,
return;
is placed in the decompiled code (due to anexit.i
instruction at the end of the disassembly), but the GML manual says that that's only valid within functions. That should probably beexit
instead?I noticed this with the game Tribal Hunter, in the code
gml_Object_menu_title_Step_0
. There are other places whereexit.i
instructions seem to be ignored in that same code as well.Reproducing steps
gml_Object_menu_title_Step_0
under code.exit.i
instructions that are ignored.Setup Details
The text was updated successfully, but these errors were encountered: