1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix freetext arguments with quotes

fixes #203
This commit is contained in:
James Booth 2013-07-20 21:02:07 +01:00
parent 8137efbfa3
commit 7af6bad5e6

View File

@ -242,19 +242,19 @@ 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 != '"') {
} else if (curr_uni != '"') {
token_size += g_unichar_to_utf8(curr_uni, NULL);
}
}
}
}
}
if (in_token) {
tokens = g_slist_append(tokens, g_strndup(token_start, token_size));