diff options
-rw-r--r-- | basic/qa/vba_tests/replace.vb | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/qa/vba_tests/replace.vb b/basic/qa/vba_tests/replace.vb index bd4817b1e455..e04cde058eb2 100644 --- a/basic/qa/vba_tests/replace.vb +++ b/basic/qa/vba_tests/replace.vb @@ -37,7 +37,7 @@ Function verify_testReplace() as String retStr = Replace(srcStr, destStr, repStr, compare:=vbTextCompare) TestLog_ASSERT retStr = "aefefdef", "text compare:" & retStr retStr = Replace(srcStr, destStr, repStr, 3, -1, vbBinaryCompare) - TestLog_ASSERT retStr = "abcefdBc", "start = 3:" & retStr + TestLog_ASSERT retStr = "cefdBc", "start = 3:" & retStr retStr = Replace(srcStr, destStr, repStr, 1, 2, vbBinaryCompare) TestLog_ASSERT retStr = "aefefdBc", "count = 2: " & retStr retStr = Replace(srcStr, destStr, repStr, 1, 0, vbBinaryCompare) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index baa9603afbae..113f94d27de3 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1414,7 +1414,7 @@ RTLFUNC(Replace) } } } - rPar.Get(0)->PutString( aExpStr ); + rPar.Get(0)->PutString( aExpStr.copy( lStartPos - 1 ) ); } } |