Skip to content

Commit fb20b6c

Browse files
committed
Fix: Pointer cast in GoLang
1 parent b9aa985 commit fb20b6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

golang/lib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func Utf8CaseFold(str string, validate bool) (string, error) {
202202
srcPtr := (*C.char)(unsafe.Pointer(unsafe.StringData(str)))
203203
srcLen := C.ulong(len(str))
204204
dst := make([]byte, len(str)*3)
205-
outLen := int(C.sz_utf8_case_fold(srcPtr, srcLen, unsafe.Pointer(&dst[0])))
205+
outLen := int(C.sz_utf8_case_fold(srcPtr, srcLen, (*C.char)(unsafe.Pointer(&dst[0]))))
206206
return string(dst[:outLen]), nil
207207
}
208208

0 commit comments

Comments
 (0)