[Libreoffice-commits] core.git: basic/source

Andras Timar andras.timar at collabora.com
Thu Jan 16 22:10:17 PST 2014


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

New commits:
commit 99159a618fd1ea90a2bc8a72621c88a4cf26e6f5
Author: Andras Timar <andras.timar at collabora.com>
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 <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

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);
         }


More information about the Libreoffice-commits mailing list