Commit f3498269 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Copy the sign bit when truncating a float tarval.

[r24403]
parent 868297f9
......@@ -811,7 +811,10 @@ static void _trunc(const fp_value *a, fp_value *result) {
/* and the mask and return the result */
sc_and(_mant(a), temp, _mant(result));
if (a != result) memcpy(_exp(result), _exp(a), value_size);
if (a != result) {
memcpy(_exp(result), _exp(a), value_size);
result->sign = a->sign;
}
}
/********
......
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