2016-11-28 | Paul Boddie | raw files shortlog changelog graph | Fixed default parameter filling, using the minimum number of arguments as the base of the default positions, not the actual number of arguments provided. | |
templates/progops.c (file) |
1.1 --- a/templates/progops.c Mon Nov 28 00:24:53 2016 +0100 1.2 +++ b/templates/progops.c Mon Nov 28 00:53:13 2016 +0100 1.3 @@ -130,7 +130,7 @@ 1.4 for (pos = nargs; pos < max; pos++) 1.5 { 1.6 if (allargs[pos].value == 0) 1.7 - allargs[pos] = __GETDEFAULT(callable.value, pos - nargs); 1.8 + allargs[pos] = __GETDEFAULT(callable.value, pos - min); 1.9 } 1.10 1.11 /* Call with the prepared arguments. */