summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index a3abf2d68cc8..392785b9c816 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -612,9 +612,9 @@ void SAL_CALL OPreparedStatement::setClob(sal_Int32 nParameterIndex, const Refer
sal_Int64 nCharWritten = 1; // XClob is indexed from 1
ISC_STATUS aErr = 0;
sal_Int64 nLen = xClob->length();
- while ( nLen > nCharWritten )
+ while ( nLen >= nCharWritten )
{
- sal_Int64 nCharRemain = nLen - nCharWritten;
+ sal_Int64 nCharRemain = nLen - nCharWritten + 1;
constexpr sal_uInt16 MAX_SIZE = SAL_MAX_UINT16 / 4;
sal_uInt16 nWriteSize = std::min<sal_Int64>(nCharRemain, MAX_SIZE);
OString sData = OUStringToOString(