diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-01-13 10:50:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-13 11:36:11 +0000 |
commit | f17000e35c861de1171a6e2a75403f40ee3bffb0 (patch) | |
tree | 762e685acfb4ff2df74e4980b3edcd711fa74989 /connectivity | |
parent | 43a0f83fd7620dc0e81a8245f8a7feef04c2a27b (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/33028
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/jdbc/Reader.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index 2f391505fb87..aaf5ff50565b 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; |