fix gate struct sizing
This commit is contained in:
		| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Redo
					Redo