diff options
author | Tsutomu Uchino <hanya@apache.org> | 2015-01-08 12:56:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-08 16:51:10 +0000 |
commit | 340ca294d43f2c5b9fda1afbf178609a015f71e3 (patch) | |
tree | a667b14b970020f7c847c6cb85154de84d9eb967 /basic | |
parent | 522563d79a81afc9a24e8a9f9b8f1bc763726180 (diff) |
Resolves: #i94895# fix illegal result of Replace runtime function
(cherry picked from commit a2700f75af61837033ff213607445cc1f74b36d6)
Conflicts:
basic/source/runtime/methods.cxx
Change-Id: If9c671a612de87d8d37bfc40704a97a6062fd150
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 7ccbab73430d..baa9603afbae 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1405,7 +1405,7 @@ RTLFUNC(Replace) if( nPos >= 0 ) { aExpStr = aExpStr.replaceAt( nPos, nFindStrLen, aReplaceStr ); - nPos = nPos - nFindStrLen + nReplaceStrLen + 1; + nPos = nPos + nReplaceStrLen; nCounts++; } else @@ -1414,7 +1414,7 @@ RTLFUNC(Replace) } } } - rPar.Get(0)->PutString( aExpStr.copy( lStartPos - 1 ) ); + rPar.Get(0)->PutString( aExpStr ); } } |