mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
Do not run lexer.Consumed if there's an error.
This commit is contained in:
+1
-1
@@ -589,7 +589,7 @@ func (r *Lexer) IsStart() bool {
|
||||
// Consumed reads all remaining bytes from the input, publishing an error if
|
||||
// there is anything but whitespace remaining.
|
||||
func (r *Lexer) Consumed() {
|
||||
if r.pos > len(r.Data) {
|
||||
if r.pos > len(r.Data) || !r.Ok() {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user