# HG changeset patch # User Mikael Berthe # Date 1133477236 -3600 # Node ID 4eb579399613d597d86e02428664dd5722dba733 # Parent db019a5f874ff3acdb515ccdcbc6e3ff58d5d7e0 Fix a small bug in split_arg() diff -r db019a5f874f -r 4eb579399613 mcabber/src/utils.c --- a/mcabber/src/utils.c Thu Dec 01 23:37:15 2005 +0100 +++ b/mcabber/src/utils.c Thu Dec 01 23:47:16 2005 +0100 @@ -388,6 +388,8 @@ // double quotes. // Return a null-terminated array of strings. This array should be freed // be the caller after use, for example with free_arg_lst(). +// If dontstriplast is true, the Nth argument isn't stripped (i.e. no +// processing of quote chars) char **split_arg(const char *arg, unsigned int n, int dontstriplast) { char **arglst; @@ -426,7 +428,7 @@ if (start < end) { *(arglst+i) = g_strndup(start, end-start); - if (!dontstriplast) + if (!dontstriplast || i+1 < n) strip_arg_special_chars(*(arglst+i)); }