1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 19:23:13 +02:00

irc: fix parsing of messages with trailing spaces and no trailing parameter (closes #1803)

This commit is contained in:
Sébastien Helleu
2022-08-07 23:28:11 +02:00
parent d068fe0de5
commit 25f25073b9
4 changed files with 15 additions and 11 deletions
+1 -8
View File
@@ -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++;