diff --git a/src/string_util.cc b/src/string_util.cc index aeb9bc8a..6dc7f5ec 100644 --- a/src/string_util.cc +++ b/src/string_util.cc @@ -66,7 +66,7 @@ void ToExponentAndMantissa(double val, double thresh, int precision, scaled *= one_k; if (scaled >= small_threshold) { mantissa_stream << scaled; - *exponent = -i - 1; + *exponent = -static_cast(i + 1); *mantissa = mantissa_stream.str(); return; }