mirror of
https://github.com/golang/go
synced 2024-11-17 23:04:56 -07:00
cgo: fix index-out-of-bounds bug
R=rsc CC=golang-dev https://golang.org/cl/4284057
This commit is contained in:
parent
3a6c0990a4
commit
3be0921e73
@ -180,7 +180,7 @@ func (f *File) saveExport(x interface{}, context string) {
|
||||
return
|
||||
}
|
||||
for _, c := range n.Doc.List {
|
||||
if string(c.Text[0:9]) != "//export " {
|
||||
if !strings.HasPrefix(string(c.Text), "//export ") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user