Fix a memory leak when iterating on characters in lexer.cpp

This commit is contained in:
Username404-59 2021-09-23 17:53:05 +02:00
parent 6af6c04d5f
commit fa9dacc23c
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ vector<tok> lex(const string& in)
{
vector<tok> resVal;
unsigned long lineNumber = 1;
for (unsigned int i = 0; i < in.size(); ++i) {
for (unsigned int i = 0; i <= in.size(); ++i) {
const char& current = in[i];
switch (current) {