summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index d93770f..aeea037 100644
--- a/types.c
+++ b/types.c
@@ -705,7 +705,7 @@ static bool types_expr(Typer *tr, Expression *e) {
FnExpr *fn_decl = NULL;
Expression *new_args = NULL;
arr_set_lena(&new_args, nparams, &tr->allocr);
- bool *params_set = typer_calloc(tr, nparams, sizeof *params_set);
+ bool *params_set = nparams ? typer_calloc(tr, nparams, sizeof *params_set) : NULL;
if (f->kind == EXPR_IDENT) {
IdentDecl *decl = ident_decl(f->ident);
assert(decl);