diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-01-19 21:56:40 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-21 17:10:15 +0100 |
commit | b703da40bb052809ff94a714fb8da7aadf2d7d6b (patch) | |
tree | f4c32b29a7e15bda928fb238f05742607200d5ad | |
parent | 7cdf5a6995a017e295e9b1099abc6dcb1987ae9e (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)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
-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 200b7b749759..31825c8277dc 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1308,7 +1308,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 ); } |