Skip to content

Commit

Permalink
fix: array bounds bug in decodeType
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jun 23, 2024
1 parent bde8ba6 commit 924c976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/objc/type_encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func decodeType(encType string) string {

decType := decodeType(encType[1:])

if encType[1] == '!' {
if len(encType) > 1 && encType[1] == '!' {
return strings.Replace(decType, "x", "*x", 1) // vector pointer
}

Expand Down

0 comments on commit 924c976

Please sign in to comment.