fix: More invalid iterator accesses

This commit is contained in:
WerWolv
2023-01-03 13:04:36 +01:00
parent f21c80c48a
commit 01917439dd
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -2041,7 +2041,9 @@ void TextEditor::ColorizeInternal() {
}
}
}
line[currentIndex].mPreprocessor = withinPreproc;
if (currentIndex < line.size())
line[currentIndex].mPreprocessor = withinPreproc;
currentIndex += UTF8CharLength(c);
if (currentIndex >= (int)line.size()) {
currentIndex = 0;