From a0be20ce45e84e9c1fb5cf7abd25a5f2df759571 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 20 Nov 2023 14:44:40 +0100 Subject: [PATCH] WIP: Added org directive --- src/ulas.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ulas.c b/src/ulas.c index a5bb969..caa57b5 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -1013,6 +1013,12 @@ int ulas_tokexpr(const char **line, unsigned long n) { if (tokrc == -1) { goto end; } + + // empty tokens are going to be ignored + if (strnlen(ulas.tok.buf, ulas.tok.maxlen) == 0) { + continue; + } + // interpret the token struct ulas_tok tok = ulas_totok( ulas.tok.buf, strnlen(ulas.tok.buf, ulas.tok.maxlen), &tokrc); @@ -1293,8 +1299,8 @@ int ulas_intexpr(const char **line, unsigned long n, int *rc) { return -1; } - // execute the tree of expressions + // execute the tree of expressions return ulas_intexpreval(expr, rc); } -- 2.30.2