8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:03:02 +01:00

Backported CORE-6521: CAST of Infinity values to FLOAT doesn't work

This commit is contained in:
AlexPeshkoff 2021-04-03 12:17:19 +03:00
parent 9370c98222
commit 2ec5134f5b

View File

@ -1735,7 +1735,7 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb)
case dtype_real:
{
double d_value = CVT_get_double(from, cb->err);
if (ABSOLUT(d_value) > FLOAT_MAX)
if (ABSOLUT(d_value) > FLOAT_MAX && ABSOLUT(d_value) != INFINITY)
cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range));
*(float*) p = (float) d_value;
}