summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-27 19:50:15 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-28 15:14:21 +0100
commitc9ac4fef4b7aa054df72bddf667edea0608d39c6 (patch)
treec59fe9dcb612668766746594b6a7c5885d7b6173 /src
parentf9a80e7d4d107fb36f94d164fb1fb829c7ba1793 (diff)
downloadweechat-c9ac4fef4b7aa054df72bddf667edea0608d39c6.zip
xfer: make xfer types and protocols case sensitive (issue #1872)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/xfer/xfer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index e0fccb2ca..497e4af53 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -200,9 +200,12 @@ xfer_search_type (const char *type)
{
int i;
+ if (!type)
+ return -1;
+
for (i = 0; i < XFER_NUM_TYPES; i++)
{
- if (weechat_strcasecmp (xfer_type_string[i], type) == 0)
+ if (strcmp (xfer_type_string[i], type) == 0)
return i;
}
@@ -221,9 +224,12 @@ xfer_search_protocol (const char *protocol)
{
int i;
+ if (!protocol)
+ return -1;
+
for (i = 0; i < XFER_NUM_PROTOCOLS; i++)
{
- if (weechat_strcasecmp (xfer_protocol_string[i], protocol) == 0)
+ if (strcmp (xfer_protocol_string[i], protocol) == 0)
return i;
}