drawinglayer/source/processor2d/vclprocessor2d.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e153f35929475ef661f03b06dfa25aacaa28acfa
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Feb 3 14:16:40 2022 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Feb 3 18:32:45 2022 +0100

    We know the buffer length here
    
    Change-Id: Ib4c7176d046a86ad22d57fc8789cd53e87859076
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129346
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 9ef220c32cfb..04258b288277 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -299,11 +299,11 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
 
                 tools::Long nWidth = 
mpOutputDevice->GetTextArray(rTextCandidate.getText(),
                                                                   
&aTransformedDXArray, 0, 1);
-                tools::Long nChars = 2;
+                sal_Int32 nChars = 2;
                 if (nWidth)
                     nChars = nWidthToFill / nWidth;
 
-                OUStringBuffer aFilled;
+                OUStringBuffer aFilled(nChars);
                 comphelper::string::padToLength(aFilled, nChars, aText[0]);
                 aText = aFilled.makeStringAndClear();
                 nPos = 0;

Reply via email to