WIP: Added org directive
authorLukas Krickl <lukas@krickl.dev>
Mon, 20 Nov 2023 13:44:40 +0000 (14:44 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 20 Nov 2023 13:44:40 +0000 (14:44 +0100)
src/ulas.c

index a5bb969cdf7f42b81cf3bf84480d09c75d326574..caa57b5394cc6b7d9b6941ecd78981e5d72759b3 100644 (file)
@@ -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);
 }