Hey, On Thu, Jul 15, 2010 at 2:11 PM, ros <[email protected]> wrote: > Working with cecil I found a problem when injecting code into a method > thus increasing method's size. Problem is that if there are br.s > instructions in that method they might now have an operand that is > greater than sbyte so a wrong operand will be written when casting to > sbyte.
Cecil doesn't do code verification, so it safely let you emit overflowing offsets. To be safe, call the extension methods: method.Body.SimplifyMacros (); // perform instrumentation method.Body.OptimizeMacros (); -- Jb Evain <[email protected]> -- -- mono-cecil
