Compile this code:
Then decompile it with NutCracker. The result is:
do
{
this.i = 1;
this.j = 0;
}
while (this.j);
In general, one operation before a do/while loop is included in the loop. I believe the reason is that the beginning of the loop is calculated incorrectly. In PreprocessDoWhileInfo there's this line:
int beginPos = endPos + curInst.arg1;
I think it should be replaced with:
int beginPos = endPos + 1 + curInst.arg1;
Compile this code:
Then decompile it with NutCracker. The result is:
In general, one operation before a do/while loop is included in the loop. I believe the reason is that the beginning of the loop is calculated incorrectly. In
PreprocessDoWhileInfothere's this line:I think it should be replaced with: