Commit a2cc742e authored by Moritz Kroll's avatar Moritz Kroll
Browse files

Fixed reading infinity floats from strings

parent 5028fbe8
......@@ -1228,6 +1228,12 @@ fp_value *fc_cast(const fp_value *value, const ieee_descriptor_t *desc, fp_value
return fc_get_snan(desc, result);
else if(value->desc.clss == INF) {
if (value->sign == 0)
return fc_get_plusinf(desc, result);
return fc_get_minusinf(desc, result);
/* set the descriptor of the new value */
result->desc.exponent_size = desc->exponent_size;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment