Weird segmentation faults

This commit is contained in:
2024-11-22 11:58:05 -05:00
parent 0abc7946c1
commit 2805cf9ab1
2 changed files with 8 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ func getConfig(configName string) (*C.char, C.int) {
fileStr := string(fileBytes)
cStr := C.CString(fileStr)
runtime.KeepAlive(fileStr)
return (*C.char)(cStr), (C.int)(len(fileStr))
return cStr, (C.int)(len(fileStr))
}
}
return nil, -1