mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 1 additions and 1 deletions
|
|
@ -180,7 +180,7 @@ func (f *File) saveExport(x interface{}, context string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, c := range n.Doc.List {
|
for _, c := range n.Doc.List {
|
||||||
if string(c.Text[0:9]) != "//export " {
|
if !strings.HasPrefix(string(c.Text), "//export ") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue