diff --git a/source/parser/lexer.cpp b/source/parser/lexer.cpp index 632ca6f1b..b97623180 100644 --- a/source/parser/lexer.cpp +++ b/source/parser/lexer.cpp @@ -96,6 +96,9 @@ namespace hex::lang { const char& c = code[offset]; + if (c == 0x00) + break; + if (std::isblank(c) || std::isspace(c)) { offset += 1; } else if (c == ';') {