diff options
author | Michael Jennings <mej@kainx.org> | 2001-05-08 05:27:26 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2001-05-08 05:27:26 +0000 |
commit | dc861870c3456f910e1093bdb4c13c9b3960f33c (patch) | |
tree | b613566f8cdb838075191532e8a0d3dc88dd1b61 /src/script.c | |
parent | 07bae6a2646efb0d58ab2cd67e402de33c81d8dc (diff) | |
download | eterm-dc861870c3456f910e1093bdb4c13c9b3960f33c.tar.gz |
A bit more before I head home.
SVN revision: 4739
Diffstat (limited to 'src/script.c')
-rw-r--r-- | src/script.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/script.c b/src/script.c index f85395a..f804db0 100644 --- a/src/script.c +++ b/src/script.c @@ -110,7 +110,7 @@ script_parse(char *s) char **token_list, **param_list; register char *pstr; register unsigned long i; - char *func_name, *params; + char *func_name, *params, *tmp; size_t len; REQUIRE(s != NULL); @@ -146,7 +146,14 @@ script_parse(char *s) chomp(func_name); } if (params) { - chomp(params); + params++; + if ((tmp = strchr(params, ')')) != NULL) { + *tmp = 0; + } else { + print_error("Error in script \"%s\": Missing closing parentheses for \"%s\".\n", s, token_list[i]); + return; + } + param_list = split(", \t", params); } D_SCRIPT(("Calling function %s with parameters: %s\n", NONULL(func_name), NONULL(params))); } |