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
void NutFunction::DecompileJCMP(VMState& state, int condVar, int offsetIp, int iterVar, int cmpOp) const
{
...
bool bCanBreak = (state.m_BlockState.inLoop || state.m_BlockState.inSwitch);
Here, m_BlockState refers to the 'if' statement and .inLoop is false. However, m_BlockState.parent refers to the loop and has .inLoop true. I think either bCanBreak needs to examine the chain of parent blocks, or inLoop needs to be propagated from parent to child.
Consider this small script:
When compiled and decompiled, the output is:
The 'break' statement is missing, resulting in an infinite loop.
The text was updated successfully, but these errors were encountered: