Commit 3be0921e authored by Robert Griesemer's avatar Robert Griesemer

cgo: fix index-out-of-bounds bug

R=rsc
CC=golang-dev
https://golang.org/cl/4284057
parent 3a6c0990
...@@ -180,7 +180,7 @@ func (f *File) saveExport(x interface{}, context string) { ...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment