diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-01-19 21:56:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-21 15:51:33 +0000 |
commit | 7713dfc9b50b88cf2548d49e65b099a6a81e9d65 (patch) | |
tree | 581498a237f506cc46fda3f6e5f5201c4f574cff | |
parent | ade704ea4ac7317f2ad300c8321c64ba54d0e692 (diff) |
Resolves: fdo#73771 Non-standard behaviour for Function Mid
Change-Id: I90be516235228574dc219447a0eef3a34f83bee2
Reviewed-on: https://gerrit.libreoffice.org/7539
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit ff48f28f71609b0ab4e6b8bc79818f765e48fddd)
-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 535160608f70..ac4b9c4f250e 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1302,7 +1302,8 @@ RTLFUNC(Mid) { nLen = aArgStr.getLength() - nStartPos; } - aResultStr = aArgStr.copy( nStartPos, nLen ); + if (nLen > 0) + aResultStr = aArgStr.copy( nStartPos, nLen ); } rPar.Get(0)->PutString( aResultStr ); } |