commit | e7f6c42a793e3736398f19740cc341fed177253a | [log] [tgz] |
---|---|---|
author | Anton Danielsson <anton.danielsson@dirac.se> | Mon Oct 05 14:26:31 2015 +0200 |
committer | Anton Danielsson <anton.danielsson@dirac.se> | Thu Oct 08 10:48:19 2015 +0200 |
tree | 7f230c04eba1bc199a267d89b74d633714d1e69b | |
parent | a822c716552f87551ee1d65b6f3229f49d39d7df [diff] |
Fixed bug in "ToExponentAndMantissa" when negative exponents where created. Unary minus where applied to an unsigned type.
diff --git a/src/string_util.cc b/src/string_util.cc index aeb9bc8..6dc7f5e 100644 --- a/src/string_util.cc +++ b/src/string_util.cc
@@ -66,7 +66,7 @@ scaled *= one_k; if (scaled >= small_threshold) { mantissa_stream << scaled; - *exponent = -i - 1; + *exponent = -static_cast<int64_t>(i + 1); *mantissa = mantissa_stream.str(); return; }