Add length check in AppendTextContainer

Allow `Length` parameter to be longer than maximum string length.
This commit is contained in:
Robert Müller 2023-04-12 22:36:10 +02:00
parent fe40048ca8
commit f0c295b2d3

View file

@ -1046,6 +1046,8 @@ public:
// string length
if(Length < 0)
Length = str_length(pText);
else
Length = minimum(Length, str_length(pText));
const float Scale = 1.0f / pSizeData->m_FontSize;