aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Lockwood2021-06-27 18:20:55 -0400
committerAlexis Lockwood2021-06-27 18:20:55 -0400
commit0550cf6ca455d4fcad2ac4bf17ea2697df582b63 (patch)
tree150a87229dfd028d0e3f7aa862a9220f4fef8323
parent3e8ec839dd2d0270b7ddac9feaea15c3f7883728 (diff)
Fix goto error when there is no space after :
-rw-r--r--README1
-rw-r--r--src/ls_lex.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/README b/README
index 6369a8b..ed182ba 100644
--- a/README
+++ b/README
@@ -48,6 +48,7 @@ Originally written by Alexis Lockwood in 2021. Ⓐ
- Label cache
- Fetcher (always execute in RAM)
- OPER_* should be LS_OPER_*
+- Get rid of all this _ctx_ shit, it's a weird habit, they're just objects
╒════════════════════════╕
│ THE SCRIPTING LANGUAGE │
diff --git a/src/ls_lex.c b/src/ls_lex.c
index 186e789..797fab7 100644
--- a/src/ls_lex.c
+++ b/src/ls_lex.c
@@ -309,9 +309,10 @@ static void _lex_num(ls_context_t * ctx, ls_token_t * tok, ls_uchar ch[2])
ctx->label_cache_i %= LS_LABEL_CACHE_SIZE;
ls_label_cache_t * lc
= &ctx->label_cache[ctx->label_cache_i];
- lc->pc = (ls_addr_t)(ctx->pc + 1);
+ lc->pc = ctx->pc;
lc->num = (ls_addr_t)(tok->body.number_val);
tok->ty = LS_TOK_NUM_LABEL;
+ break;
}
else
{