From d36331f05d30c78fdca045592687136c819c58da Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 11 Sep 2023 09:41:09 +0200 Subject: [PATCH] Strings: Set nil to last string array entry This is what GTK wants to determine where the array ends --- internal/strings/strings.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/strings/strings.go b/internal/strings/strings.go index 7f2fc99f..ef948c17 100644 --- a/internal/strings/strings.go +++ b/internal/strings/strings.go @@ -16,10 +16,11 @@ func ByteSlice(name []string) **byte { if name == nil { return nil } - res := make([]*byte, len(name)) + res := make([]*byte, len(name)+1) for i, v := range name { res[i] = CString(v) } + res[len(name)] = nil return &res[0] }