Update lexer.go

This commit is contained in:
Dmitry Dorogin
2018-07-17 13:41:31 +03:00
committed by GitHub
parent d1b659f03e
commit c33a78ba6e
+2 -2
View File
@@ -649,7 +649,7 @@ func (r *Lexer) Bytes() []byte {
return nil
}
ret := make([]byte, base64.StdEncoding.DecodedLen(len(r.token.byteValue)))
len, err := base64.StdEncoding.Decode(ret, r.token.byteValue)
n, err := base64.StdEncoding.Decode(ret, r.token.byteValue)
if err != nil {
r.fatalError = &LexerError{
Reason: err.Error(),
@@ -658,7 +658,7 @@ func (r *Lexer) Bytes() []byte {
}
r.consume()
return ret[:len]
return ret[:n]
}
// Bool reads a true or false boolean keyword.