Skip to content

Commit a640e2f

Browse files
committed
Fixed CORE-6521: CAST of Infinity values to FLOAT doesn't work
1 parent 4ab8bc0 commit a640e2f

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
@@ -2009,7 +2009,7 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c
20092009
case dtype_real:
20102010
{
20112011
double d_value = CVT_get_double(from, decSt, cb->err);
2012-
if (ABSOLUT(d_value) > FLOAT_MAX)
2012+
if (ABSOLUT(d_value) > FLOAT_MAX && ABSOLUT(d_value) != INFINITY)
20132013
cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_numeric_out_of_range));
20142014
*(float*) p = (float) d_value;
20152015
}

0 commit comments

Comments
 (0)