mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
fix a d'oh in the param/return type checking
This commit is contained in:
parent
dcb51dc586
commit
67635e9dd0
1 changed files with 2 additions and 0 deletions
|
@ -1138,6 +1138,7 @@ function_expr (expr_t *e1, expr_t *e2)
|
|||
if (ftype->parm_types[i - 1] == &type_float && e->type == ex_integer) {
|
||||
e->type = ex_float;
|
||||
e->e.float_val = e->e.integer_val;
|
||||
t = &type_float;
|
||||
}
|
||||
if (ftype->num_parms != -1) {
|
||||
if (t != ftype->parm_types[i - 1])
|
||||
|
@ -1201,6 +1202,7 @@ return_expr (function_t *f, expr_t *e)
|
|||
if (f->def->type->aux_type == &type_float && e->type == ex_integer) {
|
||||
e->type = ex_float;
|
||||
e->e.float_val = e->e.integer_val;
|
||||
t = &type_float;
|
||||
}
|
||||
if (f->def->type->aux_type != t)
|
||||
return error (e, "type mismatch for return value of %s",
|
||||
|
|
Loading…
Reference in a new issue