Fix small issues

This commit is contained in:
Wojciech Figat
2022-08-02 16:53:31 +02:00
parent f16372efad
commit e59de73948
2 changed files with 2 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ void Font::ProcessText(const StringView& text, Array<FontLineCache>& outputLines
lastMoveLine = moveLine;
}
if (tmpLine.LastCharIndex >= tmpLine.FirstCharIndex || text[textLength - 1] == '\n')
if (textLength != 0 && (tmpLine.LastCharIndex >= tmpLine.FirstCharIndex || text[textLength - 1] == '\n'))
{
// Add line
tmpLine.Size.X = cursorX;