Browse Source

Fix infinit loop if first word overflows the text box

Fixes #2829
pull/2731/head
Anders Jenbo 5 years ago
parent
commit
41f6b62caa
  1. 2
      Source/engine/render/text_render.cpp

2
Source/engine/render/text_render.cpp

@ -111,7 +111,7 @@ void WordWrapString(char *text, size_t width, GameFontTables size, int spacing)
}
size_t j; // Backtrack to the previous space
for (j = i; j >= lineStart; j--) {
for (j = i; j > lineStart; j--) {
if (text[j] == ' ') {
break;
}

Loading…
Cancel
Save