From 2c173d25b04cfde067e3d4b32e4afc61e3e82b0b Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 17 Feb 2019 01:10:39 -0800 Subject: Ensure right number of arguments to non-prototype function definitions --- expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expr.c b/expr.c index 28dc68f..4cc45b4 100644 --- a/expr.c +++ b/expr.c @@ -461,7 +461,7 @@ postfixexpr(struct scope *s, struct expression *r) break; if (e->call.args) expect(TCOMMA, "or ')' after function call argument"); - if (!p && !t->func.isvararg && t->func.isprototype) + if (!p && !t->func.isvararg && t->func.paraminfo) error(&tok.loc, "too many arguments for function call"); *end = assignexpr(s); if (!t->func.isprototype || (t->func.isvararg && !p)) -- cgit v1.2.3