raygui/cstring.go: "fix" possible misuse of unsafe.Pointer
This commit is contained in:
parent
5d704708c4
commit
7e9246c069
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ func (arr *CStringArray) ToSlice() []string {
|
||||||
defer C.free(unsafe.Pointer(cs))
|
defer C.free(unsafe.Pointer(cs))
|
||||||
p := uintptr(arr.Pointer)
|
p := uintptr(arr.Pointer)
|
||||||
for {
|
for {
|
||||||
cs = (**C.char)(unsafe.Pointer(p))
|
cs = *(***C.char)(unsafe.Pointer(&p))
|
||||||
if *cs == nil { // skip NULL - the last element
|
if *cs == nil { // skip NULL - the last element
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue