mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 02:28:15 +00:00
Check argument index
This commit is contained in:
parent
4193485b43
commit
8f4b918c5b
@ -1626,10 +1626,12 @@ class basic_args {
|
||||
uint64_t num_args = -signed_types;
|
||||
return index < num_args ? args_[index] : format_arg();
|
||||
}
|
||||
if (index > internal::MAX_PACKED_ARGS)
|
||||
return format_arg();
|
||||
format_arg arg;
|
||||
if (index > internal::MAX_PACKED_ARGS)
|
||||
return arg;
|
||||
arg.type_ = type(index);
|
||||
if (arg.type_ == internal::NONE)
|
||||
return arg;
|
||||
internal::value<Context> &val = arg.value_;
|
||||
val = values_[index];
|
||||
return arg;
|
||||
|
Loading…
Reference in New Issue
Block a user