From 9b74acc9ab5c360e035510a7060f5d3ace387ac5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 1 Jul 2002 21:38:48 +0000 Subject: [PATCH] cmd_get_quoted_params() fixes git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2862 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/commands.c | 8 ++++++-- 1 file 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; }