mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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)++;
|
||||
|
||||
pos = *data;
|
||||
while (**data != '\0' && **data != quote) {
|
||||
while (**data != '\0' && (**data != quote || (*data)[1] != ' ')) {
|
||||
if (**data == '\\' && (*data)[1] != '\0')
|
||||
g_memmove(*data, (*data)+1, strlen(*data));
|
||||
(*data)++;
|
||||
}
|
||||
|
||||
if (**data != '\0') *(*data)++ = '\0';
|
||||
if (**data == quote) {
|
||||
*(*data)++ = '\0';
|
||||
if (**data == ' ')
|
||||
(*data)++;
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user