We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f910d commit 1dc4167Copy full SHA for 1dc4167
go/type.go
@@ -180,10 +180,10 @@ func NewStringReader(lines []string) *StringReader{
180
func (self*StringReader) __init__(lines []string){
181
size:=0
182
for_, l:=rangelines{
183
-size+=len(l)
+size+=len(l)+1// +1 for EOL
184
}
185
self.buf=make([]string, 0, size)
186
-self.pos=make([]pos, 0, size)
+self.pos=make([]pos, 0, size+1) // +1 for EOF
187
varlnum=0
188
forlnum<len(lines){
189
varcol=0
0 commit comments