fix invalid const expr eval for negative floats

This commit is contained in:
Andrew Kelley
2016-01-31 21:50:41 -07:00
parent 675de74412
commit 2e092e08f4
2 changed files with 3 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ void bignum_negate(BigNum *dest, BigNum *op) {
dest->kind = op->kind;
if (dest->kind == BigNumKindFloat) {
dest->data.x_float = -dest->data.x_float;
dest->data.x_float = -op->data.x_float;
} else {
dest->data.x_uint = op->data.x_uint;
dest->is_negative = !op->is_negative;