From c083114c120f665289d775c0cf8f04009f0934cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Fri, 20 Jan 2017 23:16:02 +0100 Subject: [PATCH] Increment stack pointer before poping. --- src/instruction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instruction.c b/src/instruction.c index 7654e1e..f162c33 100644 --- a/src/instruction.c +++ b/src/instruction.c @@ -234,8 +234,8 @@ stack_pop(rk65c02emu_t *e) { uint8_t val; - val = bus_read_1(e->bus, STACK_START+e->regs.SP); e->regs.SP++; + val = bus_read_1(e->bus, STACK_START+e->regs.SP); return val; }