From fabfa5cb07a4d407146f22afdb5349cdde8016b2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 17 May 2015 15:40:31 -0700 Subject: Fix crash bug in Z80 interpreter --- z80_to_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index 313a8bb..1f8d477 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -1674,7 +1674,7 @@ code_info z80_make_interp_stub(z80_context * context, uint16_t address) call(code, opts->gen.save_context); mov_irdisp(code, address, opts->gen.context_reg, offsetof(z80_context, pc), SZ_W); push_r(code, opts->gen.context_reg); - call_args(code, (code_ptr)z80_interp_handler, 2, opts->gen.scratch1, opts->gen.scratch2); + call_args(code, (code_ptr)z80_interp_handler, 2, opts->gen.scratch1, opts->gen.context_reg); mov_rr(code, RAX, opts->gen.scratch1, SZ_PTR); pop_r(code, opts->gen.context_reg); call(code, opts->gen.load_context); -- cgit v1.2.3