diff options
author | Oliver Kiddle <opk@zsh.org> | 2014-10-02 18:57:40 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2014-10-02 19:29:32 +0200 |
commit | 00a654af5c84f10a682f7e47547f7362865f2139 (patch) | |
tree | 617ec2ebe0359bb9df7c211121142d6ae816f5e7 /Src | |
parent | 8cbff0b82ee285b7424476439fe1ef4d1032c593 (diff) | |
download | zsh-00a654af5c84f10a682f7e47547f7362865f2139.tar.gz zsh-00a654af5c84f10a682f7e47547f7362865f2139.tar.xz zsh-00a654af5c84f10a682f7e47547f7362865f2139.zip |
33323: fix bug in removing math functions and complete -M option to functions
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index a2a3ad748..4a10c7dd1 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2759,7 +2759,7 @@ bin_functions(char *name, char **argv, Options ops, int func) tokenize(*argv); if ((pprog = patcompile(*argv, PAT_STATIC, 0))) { queue_signals(); - for (p = mathfuncs, q = NULL; p; q = p, p = p->next) { + for (p = mathfuncs, q = NULL; p; q = p) { MathFunc next; do { next = NULL; @@ -2774,6 +2774,8 @@ bin_functions(char *name, char **argv, Options ops, int func) } /* if we deleted one, retry with the new p */ } while (next); + if (p) + p = p->next; } unqueue_signals(); } else { |