curl: make -N handled correctly

Options marked ARG_NO should have their 'toggle' value reverted when the
short option is used as it implies using the --no- prefix.

-N happens be the only short option flag for a --no- long option.

Reported-by: Stefan Eissing
Closes #17527
This commit is contained in:
Daniel Stenberg 2025-06-03 13:34:08 +02:00
parent 741748e341
commit c7658f274c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2881,6 +2881,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
err = PARAM_OPTION_UNKNOWN;
break;
}
toggle = !(a->desc & ARG_NO);
}
if((a->desc & ARG_TLS) && !feature_ssl) {
err = PARAM_LIBCURL_DOESNT_SUPPORT;