mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Fix getDimension throwing error if there is \r at end of line (#15299)
This commit is contained in:
parent
4975afb5ff
commit
f2ab887644
1 changed files with 1 additions and 1 deletions
|
@ -721,7 +721,7 @@ core::dimension2d<u32> CGUITTFont::getDimension(const std::u32string& text) cons
|
|||
if (p == '\r') // Mac or Windows line breaks.
|
||||
{
|
||||
lineBreak = true;
|
||||
if (*(iter + 1) == '\n')
|
||||
if (iter + 1 != text.end() && *(iter + 1) == '\n')
|
||||
{
|
||||
++iter;
|
||||
p = *iter;
|
||||
|
|
Loading…
Add table
Reference in a new issue