The easiest way to move an offset #784
-
As answered here, the lib takes care about br instructions so that they point to the right places. For example, I have the following
and use InsertBefore(IL_0003) to put two additional instructions:
So
But it is not convenient too. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I suppose the easiest way would be to convert the Maybe that's not very intuitive, but at least it won't require you to update the references (which is a bit tricky to get right). |
Beta Was this translation helpful? Give feedback.
I suppose the easiest way would be to convert the
call
instruction into anop
by changing the opcode on theInstruction
instance and clearing its operand, then inserting the secondnop
and acall
instruction created from scratch afterwards. That way existing references would be preserved, but would now point to the firstnop
.Maybe that's not very intuitive, but at least it won't require you to update the references (which is a bit tricky to get right).