Skip to content

Commit

Permalink
Strings: Set nil to last string array entry
Browse files Browse the repository at this point in the history
This is what GTK wants to determine where the array ends
  • Loading branch information
jwijenbergh committed Jan 5, 2024
1 parent 72a11ab commit d36331f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/strings/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

Expand Down

0 comments on commit d36331f

Please sign in to comment.