From 918302f79b567a67fb40a806086330016d9debfc Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 23 Sep 2023 01:35:18 +0200 Subject: [PATCH] ir: fix possible crash in validity check about PREPARECALL --- intermediate/src/prog8/intermediate/IRProgram.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/intermediate/src/prog8/intermediate/IRProgram.kt b/intermediate/src/prog8/intermediate/IRProgram.kt index bdd6d6ee9..65a2fce0b 100644 --- a/intermediate/src/prog8/intermediate/IRProgram.kt +++ b/intermediate/src/prog8/intermediate/IRProgram.kt @@ -223,7 +223,7 @@ class IRProgram(val name: String, var i = index+1 var instr2 = chunk.instructions[i] val registers = mutableSetOf() - while(instr2.opcode!=Opcode.SYSCALL && instr2.opcode!=Opcode.CALL) { + while(instr2.opcode!=Opcode.SYSCALL && instr2.opcode!=Opcode.CALL && i