From 0f430e399c2a626f9fff72ac0e4ba56f2f4df34d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 15 Apr 2024 16:30:30 +0630 Subject: Changed hex format from x -> 0x --- asm/lexer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/lexer.cpp b/asm/lexer.cpp index 361d9ef..e463b7c 100644 --- a/asm/lexer.cpp +++ b/asm/lexer.cpp @@ -386,8 +386,8 @@ lerr_t tokenise_buffer(string_view source, std::vector &tokens) return lerr_t(lerr_type_t::INVALID_NUMBER_LITERAL, column, line); t = tokenise_literal_number(source, column); } - else if (first == 'x' && source.size() > 1 && - is_char_in_s(source[1], VALID_HEX)) + else if (first == '0' && source.size() > 2 && source[1] == 'x' && + is_char_in_s(source[2], VALID_HEX)) { auto end = source.find_first_not_of(VALID_HEX); if (end == string::npos) -- cgit v1.2.3-13-gbd6f