From 5a595d00d32b8697c438d0cd0e45d66ff4bdd426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Tue, 29 Dec 2020 18:58:34 +0100 Subject: [PATCH] Actually use given interrupt count. --- .../java/li/cil/oc2/common/vm/ManagedInterruptAllocator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/li/cil/oc2/common/vm/ManagedInterruptAllocator.java b/src/main/java/li/cil/oc2/common/vm/ManagedInterruptAllocator.java index 473c522c..628d84a7 100644 --- a/src/main/java/li/cil/oc2/common/vm/ManagedInterruptAllocator.java +++ b/src/main/java/li/cil/oc2/common/vm/ManagedInterruptAllocator.java @@ -1,7 +1,6 @@ package li.cil.oc2.common.vm; import li.cil.oc2.api.bus.device.vm.InterruptAllocator; -import li.cil.sedna.riscv.device.R5PlatformLevelInterruptController; import java.util.BitSet; import java.util.OptionalInt; @@ -45,7 +44,7 @@ public final class ManagedInterruptAllocator implements InterruptAllocator { throw new IllegalStateException(); } - if (interrupt < 1 || interrupt >= R5PlatformLevelInterruptController.INTERRUPT_COUNT) { + if (interrupt < 1 || interrupt >= interruptCount) { throw new IllegalArgumentException(); }