Closed Psimage closed 7 years ago
Can this be due to OP_LINE between OP_JZ/OP_JCMP and OP_JMP?
It seens that there are three do-while statement in one function, they jump back to thie same pos, but the current code only consider the outer loop. PS: As you canot split the word 'while' in two lines, it's impossible that OP_LINE appear between OP_JZ/OP_JCMP and OP_JMP.
there is a 'break' operation in the inner loop using OP_JCMP, it cause the crash
Yeah. Broke it with this
Can this be due to OP_LINE between OP_JZ/OP_JCMP and OP_JMP?
emmmm... , maybe this will happen in some case?
I think the pattern of this function will looks like
while (++i < 20)
{
if (...) continue;
if (...) continue;
if (...) continue;
if (...) continue;
}
In some cases
void NutFunction::DecompileDoWhileLoop( VMState& state, int endPos) const
endPos > state.IP()
which causesExpressionPtr condition;
to be null and crash later when printing DoWhileStatement.Tested on: script.zip