From 193d9de3f0e9a9517f1ee019afd46bbf6cb63f57 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 14 Jun 2022 21:08:14 +0100 Subject: [PATCH] [Minor] Use fixed floating point format --- src/client/rspamc.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx index b7341be4f..f01ce58fd 100644 --- a/src/client/rspamc.cxx +++ b/src/client/rspamc.cxx @@ -826,7 +826,7 @@ rspamc_symbol_output(FILE *out, const ucl_object_t *obj) const auto *val = ucl_object_lookup(obj, "score"); if (val != nullptr) { - fmt::print(out, "({:.2})", ucl_object_todouble(val)); + fmt::print(out, "({:.2f})", ucl_object_todouble(val)); } val = ucl_object_lookup(obj, "options"); if (val != nullptr && val->type == UCL_ARRAY) { @@ -925,8 +925,8 @@ rspamc_metric_output(FILE *out, const ucl_object_t *obj) if (got_scores == 2) { fmt::print(out, "Score: {} / {}\n", - emphasis_argument(score, "{:.2}"), - emphasis_argument(required_score, "{:.2}")); + emphasis_argument(score, "{:.2f}"), + emphasis_argument(required_score, "{:.2f}")); } elt = ucl_object_lookup(obj, "symbols"); -- 2.39.5