Browse Source

Fix extra content rendered in dialogs

More then just the given line was being plased in the line buffer which
caused a lot of double rendering and sometimes also invalid UTF-8
resulting is stray question marks under the text
pull/2942/head
Anders Jenbo 5 years ago
parent
commit
7f6dec6dca
  1. 2
      Source/minitext.cpp

2
Source/minitext.cpp

@ -50,7 +50,7 @@ void LoadText(const char *text)
size_t previous = 0;
while (true) {
size_t next = paragraphs.find('\n', previous);
TextLines.emplace_back(paragraphs.substr(previous, next));
TextLines.emplace_back(paragraphs.substr(previous, next - previous));
if (next == std::string::npos)
break;
previous = next + 1;

Loading…
Cancel
Save