summaryrefslogtreecommitdiff
path: root/lib/easygetopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/easygetopt.c')
-rw-r--r--lib/easygetopt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/easygetopt.c b/lib/easygetopt.c
index c4c6f631c..cac8378e7 100644
--- a/lib/easygetopt.c
+++ b/lib/easygetopt.c
@@ -51,7 +51,8 @@ static struct curl_easyoption *lookup(const char *name, CURLoption id)
const struct curl_easyoption *curl_easy_option_by_name(const char *name)
{
- return lookup(name, 0);
+ /* when name is used, the id argument is ignored */
+ return lookup(name, CURLOPT_LASTENTRY);
}
const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)