Make sure ui::label shaping doesn't get stuck in infinite loop

This commit is contained in:
Nikita Lisitsa 2022-05-21 20:22:47 +03:00
parent 057cf1c4c7
commit 711253bbfe

View file

@ -234,6 +234,9 @@ namespace psemek::ui
++current_glyph;
}
if (wrap_end && current_glyph == line_begin)
break;
if (wrap_end && current_glyph > line_begin)
{
std::size_t space_pos = current_glyph - 1;