diff options
-rw-r--r-- | src/core/wee-url.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/wee-url.c b/src/core/wee-url.c index e5edbb920..b0d19a340 100644 --- a/src/core/wee-url.c +++ b/src/core/wee-url.c @@ -1027,9 +1027,12 @@ weeurl_search_constant (struct t_url_constant *constants, const char *name) { int i; + if (!name) + return -1; + for (i = 0; constants[i].name; i++) { - if (string_strcasecmp (constants[i].name, name) == 0) + if (strcmp (constants[i].name, name) == 0) { return i; } @@ -1090,9 +1093,12 @@ weeurl_search_option (const char *name) { int i; + if (!name) + return -1; + for (i = 0; url_options[i].name; i++) { - if (string_strcasecmp (url_options[i].name, name) == 0) + if (strcmp (url_options[i].name, name) == 0) { return i; } |