From b28d45df8a3af4983349afda89fc8dd4fb07b63c Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 16 Nov 2020 22:54:54 +0100 Subject: [PATCH] Fix //-style comments not working on last line --- source/parser/lexer.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 == ';') {