From 417f033a0ec2e256786407d71fa0a12876650ac1 Mon Sep 17 00:00:00 2001 From: Brendan Porter Date: Fri, 17 Aug 2018 13:36:08 -0500 Subject: [PATCH] trying to fix gpio_slowdown --- matrix.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/matrix.go b/matrix.go index 2d80aeb..67468e6 100644 --- a/matrix.go +++ b/matrix.go @@ -159,8 +159,7 @@ 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)))) - arglen := len(s) - 1 - a := (*[arglen]*C.char)(cArray) + a := (*[1<<30 - 1]*C.char)(cArray) for idx, substring := range s { a[idx] = C.CString(substring)