about summary refs log tree commit diff stats
path: root/src/tools/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/parser.c')
-rw-r--r--src/tools/parser.c10
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);
                 }
             }
         }