From e0eb3d1fc6e87e2cbe49b2b0e36b7afbeddf93ae Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 19 Aug 2018 18:58:25 +0300 Subject: [PATCH] Fix hang if CPU got in loop that was fully in cache without memory accesses. --- newcpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newcpu.cpp b/newcpu.cpp index 42faa1b5..3066344c 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -6245,8 +6245,8 @@ static void m68k_run_2p (void) cpu_cycles = 4 * CYCLE_UNIT * cycles_mult; cpu_cycles /= CYCLES_DIV; cpu_cycles -= CYCLE_UNIT; - if (cpu_cycles < 0) - cpu_cycles = 0; + if (cpu_cycles <= 0) + cpu_cycles = cpucycleunit; } else { -- 2.47.3