mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
enable passing NIL into a function
This commit is contained in:
parent
f8a41cb1bc
commit
bc44f950af
1 changed files with 4 additions and 0 deletions
|
@ -1200,6 +1200,10 @@ function_expr (expr_t *e1, expr_t *e2)
|
||||||
t = &type_float;
|
t = &type_float;
|
||||||
}
|
}
|
||||||
if (ftype->num_parms != -1) {
|
if (ftype->num_parms != -1) {
|
||||||
|
if (t == &type_void) {
|
||||||
|
t = ftype->parm_types[i - 1];
|
||||||
|
e->type = expr_types[t->type];
|
||||||
|
}
|
||||||
if (t != ftype->parm_types[i - 1])
|
if (t != ftype->parm_types[i - 1])
|
||||||
err = error (e, "type mismatch for parameter %d of %s",
|
err = error (e, "type mismatch for parameter %d of %s",
|
||||||
i, e1->e.def->name);
|
i, e1->e.def->name);
|
||||||
|
|
Loading…
Reference in a new issue