diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-19 15:43:07 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-03-19 15:45:56 +0000 |
commit | 14d452d0c2874f47f0b6ac1cd1c725195d5d69a9 (patch) | |
tree | 1607d209028ba61bab8309886a9582c1e2a356f8 /basic | |
parent | 38fb0462578bde685e3862187a2dc842968d8f72 (diff) |
fix for fdo#62090 Mid function regression
Change-Id: Ia6a73d6a44a34345b512922037d01b8b40ac24a8
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 5dc45ed0be71..862f4d00aea4 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() ); |