Skip to content

Commit 2ec5134

Browse files
committed
Backported CORE-6521: CAST of Infinity values to FLOAT doesn't work
1 parent 9370c98 commit 2ec5134

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/common/cvt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb)
17351735
case dtype_real:
17361736
{
17371737
double d_value = CVT_get_double(from, cb->err);
1738-
if (ABSOLUT(d_value) > FLOAT_MAX)
1738+
if (ABSOLUT(d_value) > FLOAT_MAX && ABSOLUT(d_value) != INFINITY)
17391739
cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range));
17401740
*(float*) p = (float) d_value;
17411741
}

0 commit comments

Comments
 (0)