mirror of
https://github.com/curl/curl.git
synced 2026-08-02 12:10:29 +03:00
cmdline: fix handling of OperationConfig linked list (--next)
Ensures that -K/--config inserts new items at the end of the list instead of overwriting the second item, and that after a -K/--config option has been parsed, the option parser's view of the current config is update. Fixes #5120 Closes #5123
This commit is contained in:
parent
3d77d089a4
commit
4e0b4fee4a
2 changed files with 4 additions and 2 deletions
|
|
@ -2258,6 +2258,7 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
|
|||
char *nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL;
|
||||
|
||||
result = getparameter(flag, nextarg, &passarg, global, config);
|
||||
config = global->last;
|
||||
if(result == PARAM_NEXT_OPERATION) {
|
||||
/* Reset result as PARAM_NEXT_OPERATION is only used here and not
|
||||
returned from this function */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue