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 */
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
FILE *file = NULL;
bool usedarg = FALSE;
int rc = 0;
- struct OperationConfig *operation = global->first;
+ struct OperationConfig *operation = global->last;
char *pathalloc = NULL;
if(!filename || !*filename) {
fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
#endif
res = getparameter(option, param, &usedarg, global, operation);
+ operation = global->last;
if(!res && param && *param && !usedarg)
/* we passed in a parameter that wasn't used! */