diff --git a/sim/gate.lua b/sim/gate.lua index e07d0ad..c136ef9 100644 --- a/sim/gate.lua +++ b/sim/gate.lua @@ -28,7 +28,7 @@ function Gate.setportstate(gate, index, state) if state ~= gate.port_states[index] then local group = gate.port_nets[index] group.state_num = group.state_num - gate.port_states[index] + state - gate.ports_states[index] = state + gate.port_states[index] = state if ((group.state_num>0) ~= (group.state==1)) and (group.in_queue==0) then Simulation.queuegroup(GSim, group)