using Mono.Cecil.Rocks;
body.SimplifyMacros( );
body.OptimizeMacros( );
////////////////////////////////////////
if (sVar == true)
path = "ccc";
else
path = "bbb";
make wrong offsets.
////////////////////////////////////////
////////////////////////////////////////
if (sVar == true)
{
path = "ccc";
}
else
{
path = "bbb";
}
works
////////////////////////////////////////
switch (sVar)
{
case 1:
path = "aaa";
break;
case 2:
path = "aaa";
break;
case 4:
path = "aaa";
break;
default:
throw new NotSupportedException("Version not supported:
" + version);
break;
}
with default statement wrong offsets
////////////////////////////////////////
--
View this message in context:
http://mono.1490590.n4.nabble.com/Fix-offsets-of-branch-statements-after-replacing-ldstr-with-a-obfuscate-method-tp3048398p3050190.html
Sent from the Mono - Cecil mailing list archive at Nabble.com.
--
--
mono-cecil