diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-09-14 13:31:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 13:31:23 +0200 |
commit | 35ba092019f6a4ba10caa43ff01c029951b37589 (patch) | |
tree | 14bfe9877e510bf8a5cf4fc4e0a107ae1b338284 /src | |
parent | 9e5e5e62177e9db41117e909fadf704524956698 (diff) | |
parent | 8dbd57a6a5fe497bde9e647a3249c1ce0ea121ab (diff) |
Merge pull request #4005 from Infinisil/fix-autoArgs
Fix auto argument passing for more auto arguments than formals
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 8c97b3760..dab11ce45 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1348,7 +1348,7 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res) } Value * actualArgs = allocValue(); - mkAttrs(*actualArgs, fun.lambda.fun->formals->formals.size()); + mkAttrs(*actualArgs, std::max(static_cast<uint32_t>(fun.lambda.fun->formals->formals.size()), args.size())); if (fun.lambda.fun->formals->ellipsis) { // If the formals have an ellipsis (eg the function accepts extra args) pass |