From c962c2201742d40cd20b74a5e4978ebef7eb85c5 Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 7 Jun 2022 18:57:41 +0200 Subject: [PATCH] Fixed a little segfault hehe :)) --- src/Lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 122878a..d1f30e3 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -23,7 +23,7 @@ int Lexer::advance() prev_loc = loc; ++index; loc.advance(); - if(index == current_lexed_text.size()) return 0; + if(index >= current_lexed_text.size()) return 0; current_char = current_lexed_text[index]; loc.pos_from_char(current_char); if(current_char == '\n')