From 87613a70c66a61df251f2a4fc2935a80da5dbd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A9=D0=B0=D0=BF=D0=BE=D0=B2?= Date: Mon, 14 Jun 2021 23:44:05 +0500 Subject: [PATCH] Fix for #2359 --- include/fmt/core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index fd0782d3..d66c7782 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2119,9 +2119,10 @@ FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end, if (num_digits == std::numeric_limits::digits10 + 1 && prev * 10ull + unsigned(p[-1] - '0') <= big) { return static_cast(value); + } else { + eh.on_error("number is too big"); + return -1; } - eh.on_error("number is too big"); - return -1; } // Parses fill and alignment.