basic/source/runtime/iosys.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99159a618fd1ea90a2bc8a72621c88a4cf26e6f5
Author: Andras Timar <[email protected]>
Date:   Thu Jan 16 16:48:41 2014 +0100

    fdo#73698 check for empty aOut
    
    Change-Id: I0da26ef746553618bd8aee69f21ff0d1261efbf6
    Reviewed-on: https://gerrit.libreoffice.org/7474
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Noel Grandin <[email protected]>

diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 3e4b9bc..bbdfcf9 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -983,7 +983,7 @@ void SbiIoSystem::WriteCon(const OUString& rText)
         }
         OUString s(aOut.copy(0, n1));
         aOut = aOut.copy(n1);
-        while (aOut[0] == '\n' || aOut[0] == '\r')
+        while ( !aOut.isEmpty() && (aOut[0] == '\n' || aOut[0] == '\r') )
         {
             aOut = aOut.copy(1);
         }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to