Fixed a little segfault hehe :))
This commit is contained in:
parent
7a320fb70a
commit
c962c22017
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user