diff options
author | Timo Sirainen <cras@irssi.org> | 2002-07-01 21:38:48 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-07-01 21:38:48 +0000 |
commit | 9b74acc9ab5c360e035510a7060f5d3ace387ac5 (patch) | |
tree | 994b9c0d17ae80bbc0b3ac5dbc3472b0ea37cc0f /src/core/commands.c | |
parent | ac864325035f2c2e52dfef9be8870887d4055f21 (diff) | |
download | irssi-9b74acc9ab5c360e035510a7060f5d3ace387ac5.zip |
cmd_get_quoted_params() fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2862 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/commands.c')
-rw-r--r-- | src/core/commands.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/commands.c b/src/core/commands.c index 4e6192ef..0669dded 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -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; } |