Small fix on bencode parse.go
This commit is contained in:
parent
56e375d053
commit
f3b38a06e5
1 changed files with 1 additions and 1 deletions
2
parse.go
2
parse.go
|
@ -96,7 +96,7 @@ func decodeString(r Reader) (data string, err os.Error) {
|
|||
err = os.NewError("Bad string length")
|
||||
return
|
||||
}
|
||||
var buf = make([]byte, len)
|
||||
var buf = make([]byte, length)
|
||||
_, err = io.ReadFull(r, buf)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue