summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2019-04-14 20:14:16 +1200
committerDavid Phillips <david@sighup.nz>2019-08-03 12:43:46 +1200
commit4fc18fe18c7251be732dc375eff21deb70065d3e (patch)
tree9a85eb8f93c2f3a42b878ff54e3cf5661d6093de
parent9d0452db9e2117dd51abd681d271083347676219 (diff)
downloadtoy-cpu-assembler-4fc18fe18c7251be732dc375eff21deb70065d3e.tar.xz
Fix bug lexing char values
-rw-r--r--lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lex.c b/lex.c
index a642ea0..c899fd7 100644
--- a/lex.c
+++ b/lex.c
@@ -151,7 +151,7 @@ static int lex_char(struct token *t) {
} else {
t->type = TOKEN_NUMERIC;
t->span = 3; /* len 'x' == 3 */
- t->i_val = buffer[column];
+ t->i_val = buffer[column++];
}
if (expect('\''))
return 1;