mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 18:39:59 +00:00
Check for text size
This commit is contained in:
parent
608e1518a5
commit
22c71cec18
@ -202,11 +202,9 @@ namespace MWGui
|
|||||||
// hack: prevent newlines at the end of the book possibly creating unnecessary pages
|
// hack: prevent newlines at the end of the book possibly creating unnecessary pages
|
||||||
if (event == BookTextParser::Event_EOF)
|
if (event == BookTextParser::Event_EOF)
|
||||||
{
|
{
|
||||||
while (plainText[plainText.size()-1] == '\n')
|
while (plainText.size() && plainText[plainText.size()-1] == '\n')
|
||||||
{
|
|
||||||
plainText.erase(plainText.end()-1);
|
plainText.erase(plainText.end()-1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TextElement elem(paper, pag, mTextStyle, plainText);
|
TextElement elem(paper, pag, mTextStyle, plainText);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user