From 94914448e5c830216c74616ad11351e3154cd005 Mon Sep 17 00:00:00 2001 From: semihbkgr Date: Mon, 28 Oct 2024 15:26:12 +0300 Subject: [PATCH] fix isNextEOS method in scanner context --- scanner/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanner/context.go b/scanner/context.go index 5f92a6ef..b5ffabbc 100644 --- a/scanner/context.go +++ b/scanner/context.go @@ -126,7 +126,7 @@ func (c *Context) isEOS() bool { } func (c *Context) isNextEOS() bool { - return len(c.src)-1 <= c.idx+1 + return len(c.src) <= c.idx+1 } func (c *Context) next() bool {