From 2ec8122a91fc09d6ce0dff502718b139a9d5689d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 23 May 2026 09:01:02 -0400 Subject: core: lexer: Fix up putback pop in consumption function Signed-off-by: Ian Moffett --- core/lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/lexer.c b/core/lexer.c index e627ba9..36818bc 100644 --- a/core/lexer.c +++ b/core/lexer.c @@ -73,11 +73,11 @@ lexer_consume_single(struct cescal_state *state, bool skip_ws) } if ((c = lexer_putback_pop(state)) != '\0') { - if (!skip_ws) { + if (skip_ws && !lexer_is_ws(c)) { return c; } - if (skip_ws && !lexer_is_ws(c)) { + if (!skip_ws && lexer_is_ws(c)) { return c; } } -- cgit v1.2.3