UndertaleModTool
UndertaleModTool copied to clipboard
Break/continue statements generated by compiler sometimes work erroneously
Break/continue statements produced by the GML compiler sometimes erroneously apply to an outer with/switch statement. Example in the following code:
with (any_instance_here)
{
a = 1
for (var i = 0; i < 10; i++)
{
if (a == 1)
break
}
// This line will never run:
a = 123
}
This is due to the otherContexts structure existing. In order to fix this problem, otherContexts and loopContexts need to get merged into one stack. This shouldn't be too difficult to do.
Is this related in any way to #191 ?