Skip to content
Permalink
Browse files

GRAPHICS: MACGUI: Added sanity check to splitString()

  • Loading branch information
sev- committed Jan 13, 2020
1 parent bd30315 commit 66455b6aa574da77831b49af77c74bacf487f74f
Showing with 4 additions and 1 deletion.
  1. +4 −1 graphics/macgui/mactext.cpp
@@ -279,7 +279,10 @@ void MacText::splitString(Common::U32String &str) {

_currentFormatting.getFont()->wordWrapText(tmp, _maxWidth, text, w);

_textLines[curLine].chunks[curChunk].text = text[0];
if (text.size())
_textLines[curLine].chunks[curChunk].text = text[0];
else
warning("MacText::splitString(): Font resulted in 0 width for text '%s'", tmp.encode().c_str());

if (text.size() > 1) {
for (uint i = 1; i < text.size(); i++) {

0 comments on commit 66455b6

Please sign in to comment.
You can’t perform that action at this time.