[Libreoffice-commits] core.git: sw/source

Adam Co rattles2013 at gmail.com
Thu Jul 25 00:11:50 PDT 2013


 sw/source/core/fields/docufld.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4ff2e6e74d635b5411bc14ab27784457e47d9c06
Author: Adam Co <rattles2013 at gmail.com>
Date:   Thu Jul 25 10:06:19 2013 +0300

    fix for SwCombinedCharField constructor with wrong init
    
    Change-Id: I71548e5fe60a8da8e89022b16a2f892900f3e4c2
    Reviewed-on: https://gerrit.libreoffice.org/5089
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c8eb6f4..dae5ac7 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2509,7 +2509,7 @@ SwFieldType* SwCombinedCharFieldType::Copy() const
 SwCombinedCharField::SwCombinedCharField( SwCombinedCharFieldType* pFTyp,
                                             const OUString& rChars )
     : SwField( pFTyp, 0 ),
-    sCharacters( rChars.copy( 0, MAX_COMBINED_CHARACTERS ))
+    sCharacters( rChars.copy( 0, std::min<sal_Int32>(rChars.getLength(), MAX_COMBINED_CHARACTERS) ))
 {
 }
 


More information about the Libreoffice-commits mailing list