editeng/source/items/svxfont.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e8b4a34c49d700cfebd3baeb0f2430e879cc236
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Sun Jul 23 09:14:49 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Sun Jul 23 14:06:21 2023 +0200

    editeng: Don’t unintentionally set KernArray.mnSubUnitFactor
    
    The first (and only) argument to KernArray constructor is nSubUnitFactor
    not array length as the code here seems to imply.
    
    Change-Id: Ie89c41d07f1aa13be595ead604df82ad775df433
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154799
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index b57449f3c359..ef6197f85778 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -441,7 +441,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, 
const OUString &rTxt,
     if( IsFixKerning() && ( nLen > 1 ) )
     {
         auto nKern = GetFixKerning();
-        KernArray aDXArray(nLen);
+        KernArray aDXArray;
         GetTextArray(pOut, rTxt, &aDXArray, nIdx, nLen);
         tools::Long nOldValue = aDXArray[0];
         sal_Int32 nSpaceCount = 0;

Reply via email to