From: Lukas Krickl Date: Mon, 20 Nov 2023 13:44:40 +0000 (+0100) Subject: WIP: Added org directive X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=a0be20ce45e84e9c1fb5cf7abd25a5f2df759571;p=ulas%2F.git WIP: Added org directive --- 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); }