summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2017-01-13 10:50:35 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2017-01-13 10:12:13 +0000
commitafe64b6f0ab839955690f07929268a3d389279bf (patch)
tree072242a947573930e1d321a0acc47c80beb2673d /connectivity
parent2e582ed403c41a07265ef090c5891eab04978117 (diff)
jdbc clob character stream: return 1 when returning a single odd byte
if at that point nBytesToRead is 0, it may be that it was 1, but we have read one byte from the buffer (m_buf). So in this case, return 1, not 0 (which would signal EOF). Change-Id: I229e53f1c38c80f709df244a3509caccd69c8ecf Reviewed-on: https://gerrit.libreoffice.org/33029 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/jdbc/Reader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index 13ab23892e1a..665caaf381d9 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -124,7 +124,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( css::uno::Sequence< sal_Int8 >& aD
}
if(nBytesToRead == 0)
- return 0;
+ return nBytesWritten;
sal_Int32 nCharsToRead = (nBytesToRead + 1)/2;