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

Julien Nabet serval2412 at yahoo.fr
Tue Mar 19 08:46:40 PDT 2013


 basic/source/runtime/methods.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 14d452d0c2874f47f0b6ac1cd1c725195d5d69a9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Mar 19 15:43:07 2013 +0000

    fix for fdo#62090 Mid function regression
    
    Change-Id: Ia6a73d6a44a34345b512922037d01b8b40ac24a8

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 5dc45ed..862f4d0 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1266,7 +1266,8 @@ RTLFUNC(Mid)
                 {
                     aResultStr = aArgStr;
                     aResultStr.remove( nStartPos, nLen );
-                    aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), nLen);
+                    //aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), nLen);
+                    aResultStr.insert( nStartPos, rPar.Get(4)->GetOUString().getStr(), std::min(nLen, rPar.Get(4)->GetOUString().getLength()));
                 }
 
                 rPar.Get(1)->PutString( aResultStr.makeStringAndClear() );


More information about the Libreoffice-commits mailing list