From e787f6b74b2ff1e55b98b7ac4d850f13386b174e Mon Sep 17 00:00:00 2001 From: Arthur Danskin Date: Thu, 30 Mar 2017 00:32:07 -0400 Subject: [PATCH] %.f should have zero precision, not default precision --- fmt/printf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fmt/printf.h b/fmt/printf.h index 038b9f26..06c999a7 100644 --- a/fmt/printf.h +++ b/fmt/printf.h @@ -439,6 +439,8 @@ void PrintfFormatter::format(BasicCStringRef format_str) { } else if (*s == '*') { ++s; spec.precision_ = internal::PrecisionHandler().visit(get_arg(s)); + } else { + spec.precision_ = 0; } }