aboutsummaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorRici Lake <ricilake@gmail.com>2020-03-18 18:28:19 -0500
committerDaniel Stenberg <daniel@haxx.se>2020-03-20 11:14:12 +0100
commit4e0b4fee4aea25da850327e068f307e6dc5200f2 (patch)
tree21bd0dfce7e4dd3ff443091737d006601f82b1ec /src/tool_getparam.c
parent3d77d089a4abaf81f4be4b78f66c4356002de3e3 (diff)
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
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 0c555cc96..0252ee029 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -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 */