From 2aed1b90a48cb794641c2a6ff1308c0fcc8904f8 Mon Sep 17 00:00:00 2001 From: Radu Rendec Date: Mon, 22 Aug 2011 23:58:45 +0300 Subject: [PATCH] Simulator: fix 1-byte indirect INC Signed-off-by: Radu Rendec --- sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim.c b/sim.c index 313af49..adf8f09 100644 --- a/sim.c +++ b/sim.c @@ -110,7 +110,7 @@ static int fetch_operand(struct sim_device *dev, return 0; } addr = dev->regs[reg]; - dev->regs[reg] += 2; + dev->regs[reg] += is_byte ? 1 : 2; break; }