shithub: orca

Download patch

ref: 7993cd3191122738b45e8968cd2d7ed63273e69b
parent: 2dc2fae47073b550f5bbf16f47941c03ea14b75b
author: Nicola Pisanti <nicola@npisanti.com>
date: Fri Jan 11 22:41:24 EST 2019

T out disabled with len 0

--- a/sim.c
+++ b/sim.c
@@ -630,7 +630,6 @@
   Usz key = index_of(PEEK(0, -2));
   PORT(0, -1, IN | PARAM);
   PORT(0, -2, IN | PARAM);
-  PORT(1, 0, OUT);
   if (len == 0) return;
   Isz read_val_x = (Isz)(key % len) + 1;
   for (Usz i = 0; i < len; ++i) {
@@ -637,6 +636,7 @@
     LOCK(0, (Isz)(i + 1));
   }
   PORT(0, (Isz)read_val_x, IN);
+  PORT(1, 0, OUT);
   POKE(1, 0, PEEK(0, read_val_x));
 END_OPERATOR