Closed x87 closed 1 year ago
Crash happens due to ambiguity in control flow caused by usage of the goto instruction:
while
if cond then
goto @exit
end
end
:exit
with some extra conditions goto @exit
is considered as part of if..then..else
construct, not if..then
as it should be.
related to #13
smallest repro:
0000:
while true
if 0@ > 0
then
break
end
if 0@ > 1
then
jump @exit
end
end
while true
if 0@ > 0
then
break
end
if 0@ > 1
then
jump @exit
end
end
:exit
end_thread
Until somehow resolved the decompiler fallbacks to the raw output if the structuring failed.
Error: Internal error: node not found at Function.error (\scout\build\scout.js:377:16) at Object.replaceNodes (\scout\build\scout.js:2535:29) at replaceIf (\scout\build\scout.js:2792:30) at structure (\scout\build\scout.js:2803:5)