If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
![List of issues](/flash/images/issue_list.png)
#2195 Pushing Instructions that are inside an if statement breaks the offset of the if statement.
Author:
SamHoque
![user user](/flash/images/user.png)
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: opened ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
If I were to add an instruction to `methodBody.getCode().code` and if the instruction was
added inside an if/for statement, it seems the offset breaks and the last instruction is
now outside of the if/for statement, how can I account for this?
insertInstruction method has special parameter (boolean mapOffsetsAfterIns) which tells
whether to map surrounding offsets to before (false = default) or after (true) the
inserted instruction.
So I guess your problem could be solved by setting this parameter to true, which will map
the jump offset of the if after the if body (when you insert instructions to the end of
the body).
State: new→opened
I already have that set to true, not sure why its not mapping it, is there anything else I
need to do on the body? I am adding multiple instructions.