From: Daniel Stenberg Date: Tue, 3 Jun 2025 11:34:08 +0000 (+0200) Subject: curl: make -N handled correctly X-Git-Tag: curl-8_14_1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7658f274c551c14f7e22031e324a25f1bdea800;p=thirdparty%2Fcurl.git 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 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index f09a594c05..51156e46b9 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -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;