sim: call pushed current pc instead of next pc onto stack
[calu.git] / 3c_disasm / instr / branch.cpp
index 28ff4ebaee30acec0097030c1b3e95db4be2dfe6..39b2e73c415348fcef9ed366893eb55902f6cd2f 100644 (file)
@@ -89,7 +89,7 @@ void Cbranch::execInstr()
                        {
                        CDat sp = this->m_cpu->getStack();
                        sp -= 4;
-                       this->m_cpu->setRAM(sp, pc);
+                       this->m_cpu->setRAM(sp, this->m_cpu->getNextPC());
                        this->m_cpu->setStack(sp);
                        }
                case 0: