From 4c2b81a012956c4bed3a3b076598a49a9d44dfec Mon Sep 17 00:00:00 2001 From: kub Date: Tue, 8 Jun 2021 23:11:17 +0200 Subject: [PATCH] 68k, fix idle loop detection crash on 64 bit platforms --- pico/sek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pico/sek.c b/pico/sek.c index bd8f70f5..ccbddb8e 100644 --- a/pico/sek.c +++ b/pico/sek.c @@ -398,7 +398,7 @@ int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop, void *ctx) // XXX: probably shouldn't patch RAM too v = m68k_read16_map[pc >> M68K_MEM_SHIFT]; - if (!(v & 0x80000000)) + if (~v & ~((uptr)-1LL >> 1)) // MSB clear? target = (u16 *)((v << 1) + pc); else { if (++idledet_bads > 128) -- 2.39.5