about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/module.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fbff070d6..148536961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-09-07  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 39218: Src/module.c: fix feature enables with math functions
+	present.  This caused parameters to be miscounted.
+
 	* 39217: Src/Modules/system.mdd: adapt zsh.mdd to avoid problems
 	with GCC preprocessor in error names.
 
diff --git a/Src/module.c b/Src/module.c
index 368254c29..46a7d7746 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -3350,6 +3350,8 @@ setfeatureenables(Module m, Features f, int *e)
     if (f->mf_size) {
 	if (setmathfuncs(m->node.nam, f->mf_list, f->mf_size, e))
 	    ret = 1;
+	if (e)
+	    e += f->mf_size;
     }
     if (f->pd_size) {
 	if (setparamdefs(m->node.nam, f->pd_list, f->pd_size, e))