Bug when decompiling.
When .Net Reflector decompile the following IL code :

ldloc.1
ldloc.1
ldc.i4.1
sub
stloc.1
brfalse.s L_014d
//dosomework

We get the following C# code (the bug is for all languages)

num--;
if (num == 0)
{
goto L_014d;
}
//dosomework

The test has to be done on the old value of num before the decrement. For instance, if initially num is equal to 1, dosomework will not be executed, however, it should.
AmineAnane
0

Add comment

Please sign in to leave a comment.