From 6ec3c47cc06c16ff3f7d038b6666bd80f0d8ab6a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 12 Nov 2019 22:18:13 -0500 Subject: [PATCH] Ensures same-level interrupts don't double trigger. --- Components/68901/MFP68901.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components/68901/MFP68901.cpp b/Components/68901/MFP68901.cpp index 2765f5406..956dca00e 100644 --- a/Components/68901/MFP68901.cpp +++ b/Components/68901/MFP68901.cpp @@ -302,7 +302,7 @@ void MFP68901::update_interrupts() { // Software interrupt mode: permit only if neither this interrupt // nor a higher interrupt is currently in service. const int highest_bit = msb16(firing_interrupts); - interrupt_line_ = !(interrupt_in_service_ & ~(highest_bit - 1)); + interrupt_line_ = !(interrupt_in_service_ & ~(highest_bit + highest_bit - 1)); } else { // Auto-interrupt mode; just signal. interrupt_line_ = true;