summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@mirocom.org>2026-05-23 09:01:02 -0400
committerIan Moffett <ian@mirocom.org>2026-05-23 09:01:02 -0400
commit2ec8122a91fc09d6ce0dff502718b139a9d5689d (patch)
tree0e0809bb421517a8ee0228cc96f800a3c737426d
parent07859d37359a82542267401a83392519e4984eb3 (diff)
core: lexer: Fix up putback pop in consumption function
Signed-off-by: Ian Moffett <ian@mirocom.org>
-rw-r--r--core/lexer.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}