mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
cmd_get_quoted_params() fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2862 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ac86432503
commit
9b74acc9ab
@ -497,13 +497,17 @@ static char *cmd_get_quoted_param(char **data)
|
|||||||
quote = **data; (*data)++;
|
quote = **data; (*data)++;
|
||||||
|
|
||||||
pos = *data;
|
pos = *data;
|
||||||
while (**data != '\0' && **data != quote) {
|
while (**data != '\0' && (**data != quote || (*data)[1] != ' ')) {
|
||||||
if (**data == '\\' && (*data)[1] != '\0')
|
if (**data == '\\' && (*data)[1] != '\0')
|
||||||
g_memmove(*data, (*data)+1, strlen(*data));
|
g_memmove(*data, (*data)+1, strlen(*data));
|
||||||
(*data)++;
|
(*data)++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (**data != '\0') *(*data)++ = '\0';
|
if (**data == quote) {
|
||||||
|
*(*data)++ = '\0';
|
||||||
|
if (**data == ' ')
|
||||||
|
(*data)++;
|
||||||
|
}
|
||||||
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user