diff options
Diffstat (limited to 'connectivity/source/drivers/odbc')
-rw-r--r-- | connectivity/source/drivers/odbc/OPreparedStatement.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index e2bf7ce3624f..c40c665da303 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -354,7 +354,8 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_ nCharLen = u.size(); nByteLen = 4 * nCharLen; pData = allocBindBuf(parameterIndex, nByteLen); - memcpy(pData, u.empty() ? 0 : &u[0], nByteLen); + if (!u.empty()) + memcpy(pData, &u[0], nByteLen); } } else |