summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lexer.c b/lexer.c
index 31c205f..7cc9b87 100644
--- a/lexer.c
+++ b/lexer.c
@@ -824,7 +824,9 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) {
case TOK_CHAR:
case TOK_EXPR:
s->val = get_val(tok, address, 3, dbg);
- tok = skip_expr(tok, dbg);
+ if (tok->next) {
+ tok = skip_expr(tok, dbg);
+ }
break;
}
}