Browse Source

T out disabled with len 0

master
Nicola Pisanti 6 years ago
parent
commit
7993cd3191
  1. 2
      sim.c

2
sim.c

@ -630,13 +630,13 @@ BEGIN_OPERATOR(track)
Usz key = index_of(PEEK(0, -2)); Usz key = index_of(PEEK(0, -2));
PORT(0, -1, IN | PARAM); PORT(0, -1, IN | PARAM);
PORT(0, -2, IN | PARAM); PORT(0, -2, IN | PARAM);
PORT(1, 0, OUT);
if (len == 0) return; if (len == 0) return;
Isz read_val_x = (Isz)(key % len) + 1; Isz read_val_x = (Isz)(key % len) + 1;
for (Usz i = 0; i < len; ++i) { for (Usz i = 0; i < len; ++i) {
LOCK(0, (Isz)(i + 1)); LOCK(0, (Isz)(i + 1));
} }
PORT(0, (Isz)read_val_x, IN); PORT(0, (Isz)read_val_x, IN);
PORT(1, 0, OUT);
POKE(1, 0, PEEK(0, read_val_x)); POKE(1, 0, PEEK(0, read_val_x));
END_OPERATOR END_OPERATOR

Loading…
Cancel
Save