From 00a654af5c84f10a682f7e47547f7362865f2139 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 2 Oct 2014 18:57:40 +0200 Subject: 33323: fix bug in removing math functions and complete -M option to functions --- Src/builtin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') 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 { -- cgit 1.4.1