mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 13:38:18 +00:00
Merge pull request #9258 from Robyt3/Textrender-Newline-Loop-Fix
Fix client hanging when rendering text with small maximum width
This commit is contained in:
commit
9c02194f09
|
@ -1560,6 +1560,7 @@ public:
|
|||
|
||||
const char *pCurrent = pText;
|
||||
const char *pEnd = pCurrent + Length;
|
||||
const char *pPrevBatchEnd = nullptr;
|
||||
const char *pEllipsis = "…";
|
||||
const SGlyph *pEllipsisGlyph = nullptr;
|
||||
if(pCursor->m_Flags & TEXTFLAG_ELLIPSIS_AT_END)
|
||||
|
@ -1966,6 +1967,9 @@ public:
|
|||
|
||||
if(NewLine)
|
||||
{
|
||||
if(pPrevBatchEnd == pBatchEnd)
|
||||
break;
|
||||
pPrevBatchEnd = pBatchEnd;
|
||||
if(!StartNewLine())
|
||||
break;
|
||||
GotNewLineLast = true;
|
||||
|
|
Loading…
Reference in a new issue