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

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

This commit is contained in:
AlexPeshkoff 2021-04-03 12:13:00 +03:00
parent 4ab8bc0044
commit a640e2fabc

View File

@ -2009,7 +2009,7 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c
case dtype_real:
{
double d_value = CVT_get_double(from, decSt, 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;
}