From: Justin Wind Date: Sun, 13 May 2012 17:04:02 +0000 (-0700) Subject: fixed typo in POP looking at wrong register X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e1a0aecf189adf6befb6ad708685813191af48bc;p=dcpu16 fixed typo in POP looking at wrong register --- diff --git a/dcpu16.c b/dcpu16.c index ea0ee26..616237d 100644 --- a/dcpu16.c +++ b/dcpu16.c @@ -178,7 +178,7 @@ void value_decode_(struct dcpu16 *vm, DCPU16_WORD value, unsigned int value_is_a assert(value <= 0x3f); DCPU16_WORD pc = (DCPU16_WORD)(vm->reg[DCPU16_REG_PC] + *pc_adjust), - sp = (DCPU16_WORD)(vm->reg[DCPU16_REG_PC] + *sp_adjust); + sp = (DCPU16_WORD)(vm->reg[DCPU16_REG_SP] + *sp_adjust); TRACE("%s>> is_a:%u pc:0x%04x sp:0x%04x value_data:0x%04x\n", __func__,