Fix a recent regression in handling max packed arguments

This commit is contained in:
Victor Zverovich 2020-04-22 07:10:06 -07:00
parent 8a11148f99
commit 3f79357ef0

View File

@ -1578,7 +1578,7 @@ template <typename Context> class basic_format_args {
if (index < max_size()) arg = args_[index]; if (index < max_size()) arg = args_[index];
return arg; return arg;
} }
if (index > internal::max_packed_args) return arg; if (index >= internal::max_packed_args) return arg;
arg.type_ = type(index); arg.type_ = type(index);
if (arg.type_ == internal::type::none_type) return arg; if (arg.type_ == internal::type::none_type) return arg;
arg.value_ = values_[index]; arg.value_ = values_[index];