basic/source/runtime/methods.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b703da40bb052809ff94a714fb8da7aadf2d7d6b
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sun Jan 19 21:56:40 2014 +0100

    Resolves: fdo#73771 Non-standard behaviour for Function Mid
    
    Change-Id: I90be516235228574dc219447a0eef3a34f83bee2
    Reviewed-on: https://gerrit.libreoffice.org/7539
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit ff48f28f71609b0ab4e6b8bc79818f765e48fddd)
    Signed-off-by: Michael Stahl <mst...@redhat.com>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 200b7b7..31825c8 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 );
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to