From c7658f274c551c14f7e22031e324a25f1bdea800 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Jun 2025 13:34:08 +0200 Subject: [PATCH] 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 --- src/tool_getparam.c | 1 + 1 file changed, 1 insertion(+) 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;