diff --git a/format.cc b/format.cc index fba6ae1a..c652b3e7 100644 --- a/format.cc +++ b/format.cc @@ -120,7 +120,7 @@ void Formatter::FormatInt(T value, FormatSpec spec) { if (IntTraits::IsNegative(value)) { sign = '-'; ++size; - abs_value = -abs_value; + abs_value = 0 - abs_value; } else if ((spec.flags & PLUS_FLAG) != 0) { sign = '+'; ++size;