diff --git a/sim/group.lua b/sim/group.lua index 0d37e80..8efe588 100644 --- a/sim/group.lua +++ b/sim/group.lua @@ -216,8 +216,8 @@ function Group.update_net_c(netc, tick) netc.state[0] = state netc.update_tick[0] = tick - local len = netc.num_gates_update[0] - for i = 1, len do + local len = netc.num_gates_update[0]-1 + for i = 0, len do local gatec = netc.gates_update_c[i] if gatec and gatec.in_queue[0]==0 then Simulation.queue_gate_c(GSim, gatec)