UndertaleModTool
UndertaleModTool copied to clipboard
decompiler replaces expression with _temp_local_var_X
Describe the bug
this GMS1.4 code:
for (var i = 0; i < 10; i++) {
array[irandom(i)]++;
x++;
}
gets decompiled as this nonworking code:
var i, _temp_local_var_1;
for (i = 0; i < 10; i++)
{
array[_temp_local_var_1]++
x++
}
Reproducing steps
script0 in attached data.win bug_decomp.zip
Setup Details
GMS1.4 674c5d8
also this
repeat(x) {
if hspeed
y += 1;
else
y += 2;
if (y>x) break;
}
gets misinterpreted by decompiler as this
var _temp_local_var_1;
_temp_local_var_1 = x
if (x <= 0)
{
}
else
{
while (true)
{
if hspeed
y += 1
else
y += 2
if (y > x)
break
else
{
_temp_local_var_1 = (x - 1)
if (x - 1)
continue
}
}
}
script1 in attached data.win bug_decomp2.zip
The latter is a known and, I believe, fixed bug with repeats and breaks. Can you try the bleeding edge?
Also, it's probably still possible to break it with more complicated breaks and continues. Just less likely to show up in a game.
yeah those both are from that bleeding edge from 18 days ago combined one