# HG changeset patch # User Michael Pavone # Date 1432591298 25200 # Node ID fbda8e865dae219025c0ab021acb70609ab94927 # Parent 61467483eb3152dc01b4f9b7251a12d134495a12 Fix crash bug in 32-bit build for certain secnarios with bcd instructions diff -r 61467483eb31 -r fbda8e865dae m68k_core_x86.c --- a/m68k_core_x86.c Mon May 25 13:21:24 2015 -0700 +++ b/m68k_core_x86.c Mon May 25 15:01:38 2015 -0700 @@ -1451,8 +1451,10 @@ cmp_ir(code, 0, opts->gen.scratch1, SZ_B); set_flag_cond(opts, CC_S, FLAG_N); - jcc(code, CC_Z, code->cur + 4); + code_ptr no_setz = code->cur+1; + jcc(code, CC_Z, no_setz); set_flag(opts, 0, FLAG_Z); + *no_setz = code->cur - (no_setz + 1); if (dst_op->base != opts->gen.scratch1) { if (dst_op->mode == MODE_REG_DIRECT) { mov_rr(code, opts->gen.scratch1, dst_op->base, SZ_B);