mirror of
https://github.com/bloeys/assimp-go.git
synced 2025-12-29 08:28:20 +00:00
Protect against aiString being empty
This commit is contained in:
@ -519,6 +519,10 @@ func parseVertexWeights(cWeights *C.struct_aiVertexWeight, count uint) []VertexW
|
||||
}
|
||||
|
||||
func parseAiString(aiString C.struct_aiString) string {
|
||||
if aiString.length == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
return C.GoStringN(&aiString.data[0], C.int(aiString.length))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user