aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-17 01:10:39 -0800
committerMichael Forney <mforney@mforney.org>2019-02-17 01:10:39 -0800
commit2c173d25b04cfde067e3d4b32e4afc61e3e82b0b (patch)
tree99568f772feb1f1bd8c53bb2c2103ed6bcba1aed
parent863fec184fdb150f4f8758cc68eb6a51f9a38dfe (diff)
downloadcproc-2c173d25b04cfde067e3d4b32e4afc61e3e82b0b.tar.xz
Ensure right number of arguments to non-prototype function definitions
-rw-r--r--expr.c2
1 files changed, 1 insertions, 1 deletions
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))