Skip to content

Commit

Permalink
fix: remove count instead of count + 1 instructions with `removeI…
Browse files Browse the repository at this point in the history
…nstructions` (#167)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>

BREAKING-CHANGE: This alters the behaviour of the function. Instead of removing `count + 1` instructions, this now removes `count` instructions.
  • Loading branch information
rstular authored and oSumAtrIX committed May 7, 2023
1 parent 4ed429d commit 98f8eed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun MutableMethodImplementation.replaceInstructions(index: Int, instructions: Li
}

fun MutableMethodImplementation.removeInstructions(index: Int, count: Int) {
for (i in count downTo 0) {
for (i in count - 1 downTo 0) {
this.removeInstruction(index + i)
}
}
Expand Down

0 comments on commit 98f8eed

Please sign in to comment.