diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-31 21:50:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-31 21:50:41 -0700 |
| commit | 2e092e08f4fefa3fcd05484a755db5f5eef8e9cd (patch) | |
| tree | 2ce0b959b66f4a7475531615c00c6fef0a2a27b1 /src | |
| parent | 675de74412e6006ee270fdd2a3b3e20727328af0 (diff) | |
| download | zig-2e092e08f4fefa3fcd05484a755db5f5eef8e9cd.tar.gz zig-2e092e08f4fefa3fcd05484a755db5f5eef8e9cd.zip | |
fix invalid const expr eval for negative floats
Diffstat (limited to 'src')
| -rw-r--r-- | src/bignum.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
