summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2023-05-29 19:59:18 -0400
committerBenji Dial <benji@benjidial.net>2023-05-29 19:59:18 -0400
commita40005c776c90fb6d8550ebecfe810ee14a398d6 (patch)
tree608c24425be4b36cc50a81e630d880560e87ca44
parent78c40e1422a86bd184ae1d571b241fa881f78ca0 (diff)
downloadlib94-a40005c776c90fb6d8550ebecfe810ee14a398d6.tar.gz
fix djn bug
-rw-r--r--lib94/executors.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib94/executors.cpp b/lib94/executors.cpp
index c15eb7a..b9fac22 100644
--- a/lib94/executors.cpp
+++ b/lib94/executors.cpp
@@ -302,7 +302,7 @@ namespace lib94 {
add_read_instruction(a_instruction_writable);
add_read_instruction(b_instruction_writable);
add_written_instruction(b_instruction_writable);
- if (dest_in.dec_not_zero())
+ if (dest_out.dec_not_zero())
program_counter = (a_instruction_writable - core + LIB94_CORE_SIZE - 1) % LIB94_CORE_SIZE;
return true;
}