Fix CodeQL alert (#3945)

This commit is contained in:
Marlene Cota 2024-04-30 12:41:29 -07:00 committed by GitHub
parent cf1f55f798
commit 48c908453d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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