mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[qfcc] Emit args for ... functions with no other parameters
I missed that the block was < -1, ie at least one real parameters.
This commit is contained in:
parent
1b40cdbab6
commit
24a42dc064
1 changed files with 3 additions and 1 deletions
|
@ -2161,7 +2161,6 @@ build_function_call (expr_t *fexpr, const type_t *ftype, expr_t *params)
|
|||
warning (fexpr, "too few arguments");
|
||||
}
|
||||
param_count = -ftype->t.func.num_params - 1;
|
||||
emit_args = !ftype->t.func.no_va_list;
|
||||
} else if (ftype->t.func.num_params >= 0) {
|
||||
if (arg_count > ftype->t.func.num_params) {
|
||||
return error (fexpr, "too many arguments");
|
||||
|
@ -2173,6 +2172,9 @@ build_function_call (expr_t *fexpr, const type_t *ftype, expr_t *params)
|
|||
}
|
||||
param_count = ftype->t.func.num_params;
|
||||
}
|
||||
if (ftype->t.func.num_params < 0) {
|
||||
emit_args = !ftype->t.func.no_va_list;
|
||||
}
|
||||
// params is reversed (a, b, c) -> c, b, a
|
||||
for (i = arg_count - 1, e = params; i >= 0; i--, e = e->next) {
|
||||
type_t *t;
|
||||
|
|
Loading…
Reference in a new issue