From 99159a618fd1ea90a2bc8a72621c88a4cf26e6f5 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Thu, 16 Jan 2014 16:48:41 +0100 Subject: fdo#73698 check for empty aOut Change-Id: I0da26ef746553618bd8aee69f21ff0d1261efbf6 Reviewed-on: https://gerrit.libreoffice.org/7474 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- basic/source/runtime/iosys.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basic') diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 3e4b9bc79968..bbdfcf91c044 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); } -- cgit