From 3f79357ef0291f2c053d5a69842a72a4ec47124e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 22 Apr 2020 07:10:06 -0700 Subject: [PATCH] Fix a recent regression in handling max packed arguments --- include/fmt/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index e301f1f5..7c37837c 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1578,7 +1578,7 @@ template class basic_format_args { if (index < max_size()) arg = args_[index]; return arg; } - if (index > internal::max_packed_args) return arg; + if (index >= internal::max_packed_args) return arg; arg.type_ = type(index); if (arg.type_ == internal::type::none_type) return arg; arg.value_ = values_[index];