summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--z80_to_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c
index d447ee3..a175a9e 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -2327,7 +2327,7 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address,
if (inst->addr_mode == Z80_IMMED_INDIRECT) {
mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B);
} else {
- zreg_to_native(opts, Z80_C, opts->gen.scratch2);
+ zreg_to_native(opts, Z80_C, opts->gen.scratch1);
}
call(code, opts->read_io);
if (inst->addr_mode != Z80_IMMED_INDIRECT) {