changeset 598:faad1927d836

Fix an off-by-one error in a branch destination in the generation of handle_cycle_limit for the Z80
author Michael Pavone <pavone@retrodev.com>
date Fri, 26 Dec 2014 12:56:53 -0800
parents 8d6ae5b3b87b
children c1cfbf1837cf
files z80_to_x86.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/z80_to_x86.c	Fri Dec 26 12:52:13 2014 -0800
+++ b/z80_to_x86.c	Fri Dec 26 12:56:53 2014 -0800
@@ -2037,7 +2037,7 @@
 	pop_r(code, R12);
 	pop_r(code, RBP);
 	pop_r(code, RBX);
-	*no_sync = code->cur - no_sync;
+	*no_sync = code->cur - (no_sync + 1);
 	//return to caller of z80_run
 	retn(code);