Skip to content

Commit 924c976

Browse files
committed
fix: array bounds bug in decodeType
1 parent bde8ba6 commit 924c976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/objc/type_encoding.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func decodeType(encType string) string {
311311

312312
decType := decodeType(encType[1:])
313313

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

0 commit comments

Comments
 (0)