mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Fix wrapping text that ends with a newline.
This commit is contained in:
parent
a3a4636fd5
commit
8a0eff8ef6
|
@ -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);
|
||||
|
||||
return out;
|
||||
|
|
Loading…
Reference in a new issue