diff options
-rw-r--r-- | asm/lexer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/lexer.cpp b/asm/lexer.cpp index a8d0828..4e24ab7 100644 --- a/asm/lexer.cpp +++ b/asm/lexer.cpp @@ -214,7 +214,7 @@ pair<token_t, lerr_t> tokenise_symbol(string_view &source, size_t &column) if (t.content == "") t.content = sym; t.column = column; - column += sym.size(); + column += sym.size() - 1; return make_pair(t, lerr_t::OK); } @@ -303,7 +303,7 @@ pair<token_t, lerr_t> tokenise_literal_char(string_view &source, size_t &column) token_t tokenise_literal_string(string_view &source, size_t &column, size_t end) { source.remove_prefix(1); - token_t token{token_type_t::LITERAL_STRING, string(source.substr(1, end - 1)), + token_t token{token_type_t::LITERAL_STRING, string(source.substr(0, end - 1)), column}; source.remove_prefix(end); column += end + 1; |