trying to fix gpio_slowdown

pull/13/head
Brendan Porter 6 years ago
parent 3c1c20ef36
commit 39fb76bcc6

@ -159,7 +159,8 @@ const MatrixEmulatorENV = "MATRIX_EMULATOR"
func stringsToC(s []string) **C.char {
cArray := C.malloc(C.size_t(len(s)) * C.size_t(unsafe.Sizeof(uintptr(0))))
a := (*[len(s) - 1]*C.char)(cArray)
arglen := len(s) - 1
a := (*[arglen]*C.char)(cArray)
for idx, substring := range s {
a[idx] = C.CString(substring)

Loading…
Cancel
Save