From a82c11bd25f83dfc567f8dfec05b3ce8dea34088 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 1 Oct 2025 03:34:45 -0400 Subject: np: lex: Return -2 on EOF Signed-off-by: Ian Moffett --- src/sys/np/core/np_lex.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sys/np') diff --git a/src/sys/np/core/np_lex.c b/src/sys/np/core/np_lex.c index 27341ab..cecb425 100644 --- a/src/sys/np/core/np_lex.c +++ b/src/sys/np/core/np_lex.c @@ -269,6 +269,8 @@ lex_nom(struct np_work *work, struct lex_token *res) /* Match the token type */ switch (c) { + case '\0': + return -2; /* EOF */ case '(': res->token = TT_LPAREN; break; -- cgit v1.2.3