fix gate struct sizing
This commit is contained in:
parent
7e19e20caf
commit
5438de0adf
@ -25,7 +25,7 @@ function Gate.new(objref, definition)
|
|||||||
objref = objref,
|
objref = objref,
|
||||||
definition = definition,
|
definition = definition,
|
||||||
}
|
}
|
||||||
local cdata = ffi.new("char["..(ffi.sizeof("struct Gate") + ffi.sizeof("struct OutPort")*(#gate.ports+1)).."]")
|
local cdata = ffi.new("char["..(ffi.sizeof("struct Gate") + ffi.sizeof("struct OutPort")*(#definition.ports+1)).."]")
|
||||||
gate.c = ffi.cast("struct Gate*", cdata)
|
gate.c = ffi.cast("struct Gate*", cdata)
|
||||||
gate.c.in_queue = 0
|
gate.c.in_queue = 0
|
||||||
return gate
|
return gate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user