From f214d70367bb0d7d683168f6c1dc5f17861fa612 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sat, 16 Apr 2011 12:23:57 +0000 Subject: [PATCH] Update CALLBACK_Idle to use the callback offset. Fixes memory corruption. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3694 --- src/cpu/callback.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index 3524c2f3..385a0c8c 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -65,7 +65,7 @@ void CALLBACK_Idle(void) { Bit16u oldcs=SegValue(cs); Bit32u oldeip=reg_eip; SegSet16(cs,CB_SEG); - reg_eip=call_idle*CB_SIZE; + reg_eip=CB_SOFFSET+call_idle*CB_SIZE; DOSBOX_RunMachine(); reg_eip=oldeip; SegSet16(cs,oldcs);