From 2e092e08f4fefa3fcd05484a755db5f5eef8e9cd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 31 Jan 2016 21:50:41 -0700 Subject: fix invalid const expr eval for negative floats --- src/bignum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bignum.cpp') diff --git a/src/bignum.cpp b/src/bignum.cpp index 56215179b8..7cf5e791cb 100644 --- a/src/bignum.cpp +++ b/src/bignum.cpp @@ -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; -- cgit v1.2.3