diff options
author | James Booth <boothj5@gmail.com> | 2013-07-20 21:02:07 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-07-20 21:02:07 +0100 |
commit | 7af6bad5e69742386747e05e749589d937bb1377 (patch) | |
tree | d9170b2270f832fd95bee8d8a1f3932001824807 | |
parent | 8137efbfa3a99b3e1b2f8aeeab90fe44220abc33 (diff) | |
download | profani-tty-7af6bad5e69742386747e05e749589d937bb1377.tar.gz |
Fix freetext arguments with quotes
fixes #203
-rw-r--r-- | src/tools/parser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/parser.c b/src/tools/parser.c index f4cfc3d2..dabf7128 100644 --- a/src/tools/parser.c +++ b/src/tools/parser.c @@ -242,15 +242,15 @@ parse_args_with_freetext(const char * const inp, int min, int max) } } } else { - if (!in_freetext && curr_uni == ' ') { + if (in_freetext) { + token_size += g_unichar_to_utf8(curr_uni, NULL); + } else if (curr_uni == ' ') { tokens = g_slist_append(tokens, g_strndup(token_start, token_size)); token_size = 0; in_token = FALSE; - } else { - if (curr_uni != '"') { - token_size += g_unichar_to_utf8(curr_uni, NULL); - } + } else if (curr_uni != '"') { + token_size += g_unichar_to_utf8(curr_uni, NULL); } } } |