summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-08-07 23:28:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-08-07 23:28:11 +0200
commit25f25073b9334fa2996678fc73c1729ce3d83839 (patch)
treee9c217bc7db146b06a52bc2497c059ba2c93a004 /src/plugins/irc
parentd068fe0de5323fecb52c2491b8a8854a2850e410 (diff)
downloadweechat-25f25073b9334fa2996678fc73c1729ce3d83839.zip
irc: fix parsing of messages with trailing spaces and no trailing parameter (closes #1803)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-message.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index febf7b9da..64a37a3e7 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -59,7 +59,7 @@ void
irc_message_parse_params (const char *parameters,
char ***params, int *num_params)
{
- const char *ptr_params, *pos_end, *pos_next;
+ const char *ptr_params, *pos_end;
char **new_params;
int alloc_params, trailing;
@@ -104,13 +104,6 @@ irc_message_parse_params (const char *parameters,
}
if (!pos_end)
pos_end = ptr_params + strlen (ptr_params);
- pos_next = pos_end;
- while (pos_next[0] == ' ')
- {
- pos_next++;
- }
- if (!pos_next[0])
- pos_end = pos_next;
if (params)
{
alloc_params++;