[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - basic/source

Julien Nabet serval2412 at yahoo.fr
Tue Apr 16 05:36:01 PDT 2013


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

New commits:
commit 69371d3fae481adb2b21701952570f829fcd8311
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
    (cherry picked from commit 14d452d0c2874f47f0b6ac1cd1c725195d5d69a9)
    Reviewed-on: https://gerrit.libreoffice.org/3408
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 858f844..7f724b1 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1262,7 +1262,7 @@ 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(), std::min(nLen, rPar.Get(4)->GetOUString().getLength()));
                 }
 
                 rPar.Get(1)->PutString( aResultStr.makeStringAndClear() );


More information about the Libreoffice-commits mailing list