# HG changeset patch # User Michael Pavone # Date 1431902431 25200 # Node ID 382a2b5b70c05aea5e6d632cd86ec74ddb6603d4 # Parent 3342548de036ba4419e6396edf74d339a34baf49 Fix crash bug in Z80 interpreter diff -r 3342548de036 -r 382a2b5b70c0 z80_to_x86.c --- a/z80_to_x86.c Sat May 16 23:08:07 2015 -0700 +++ b/z80_to_x86.c Sun May 17 15:40:31 2015 -0700 @@ -1674,7 +1674,7 @@ 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);