diff options
author | David Phillips <david@sighup.nz> | 2019-04-14 20:14:16 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-08-03 12:43:46 +1200 |
commit | 4fc18fe18c7251be732dc375eff21deb70065d3e (patch) | |
tree | 9a85eb8f93c2f3a42b878ff54e3cf5661d6093de | |
parent | 9d0452db9e2117dd51abd681d271083347676219 (diff) | |
download | toy-cpu-assembler-4fc18fe18c7251be732dc375eff21deb70065d3e.tar.xz |
Fix bug lexing char values
-rw-r--r-- | lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |