Throw exception on invalid try-catch nodes

Signed-off-by: Major <major@emulate.rs>
bzip2
Major 5 years ago committed by Graham
parent 59159f17a3
commit dc36c7835c
  1. 2
      asm/src/main/java/dev/openrs2/asm/InsnNodeUtils.kt

@ -313,7 +313,7 @@ fun TryCatchBlockNode.isBodyEmpty(): Boolean {
while (true) { while (true) {
when { when {
current == null -> return false current == null -> error("Failed to reach end of try-catch block.")
current === end -> return true current === end -> return true
current.opcode != -1 -> return false current.opcode != -1 -> return false
else -> current = current.next else -> current = current.next

Loading…
Cancel
Save