fix off by one segfault

This commit is contained in:
Redo 2022-11-04 17:13:27 -06:00
parent eb05504252
commit 898726af35

View File

@ -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)