summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'function.c')
-rw-r--r--function.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/function.c b/function.c
index 125a994..a6496fa 100644
--- a/function.c
+++ b/function.c
@@ -1049,8 +1049,15 @@ expand_function (o, function, text, end)
text = expand_argument (text, end);
p2 = text;
- while ((p = find_next_token (&p2, &i)) != 0)
+ while (*p2 != '\0')
{
+ while (isspace(*p2))
+ ++p2;
+ p = p2;
+ for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i)
+ {}
+ if (!i)
+ break;
o = variable_buffer_output (o, p, i);
o = variable_buffer_output (o, " ", 1);
doneany = 1;