Fix wrapping text that ends with a newline.

This commit is contained in:
Aloshi 2013-09-20 22:06:50 -05:00
parent a3a4636fd5
commit 8a0eff8ef6

View file

@ -415,7 +415,7 @@ std::string Font::wrapText(std::string text, float xLen) const
} }
} }
if(!out.empty()) //chop off the last newline if(!out.empty() && newline == std::string::npos) //chop off the last newline if we added one
out.erase(out.length() - 1, 1); out.erase(out.length() - 1, 1);
return out; return out;