diff options
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/firebird/PreparedStatement.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 62eec1ceaa42..f13b06be5c83 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -364,7 +364,7 @@ namespace { sal_Int64 toNumericWithoutDecimalPlace(const Any& x, sal_Int32 scale) { if (double value = 0; x >>= value) - return static_cast<sal_Int64>(value * pow10Integer(scale) + 0.5); + return static_cast<sal_Int64>(value * pow10Integer(scale) + (value >= 0 ? 0.5 : -0.5)); // Can't use conversion of string to double, because it could be not representable in double |