mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
fix a secfault in return_expr
This commit is contained in:
parent
72ae59f882
commit
969dad87eb
1 changed files with 3 additions and 1 deletions
|
@ -2272,7 +2272,7 @@ function_expr (expr_t *e1, expr_t *e2)
|
|||
expr_t *
|
||||
return_expr (function_t *f, expr_t *e)
|
||||
{
|
||||
type_t *t = get_type (e);
|
||||
type_t *t;
|
||||
|
||||
if (!e) {
|
||||
if (f->def->type->aux_type != &type_void) {
|
||||
|
@ -2287,6 +2287,8 @@ return_expr (function_t *f, expr_t *e)
|
|||
return new_unary_expr ('r', 0);
|
||||
}
|
||||
|
||||
t = get_type (e);
|
||||
|
||||
if (e->type == ex_error)
|
||||
return e;
|
||||
if (f->def->type->aux_type == &type_void) {
|
||||
|
|
Loading…
Reference in a new issue