mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Check for procedures properly in return value
I guess either I goofed and thought void functions had no return type at all, or at one stage that was the case, but either way, I had never tested procedures.
This commit is contained in:
parent
35c0b84ccc
commit
7379b1226d
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ static symbol_t *
|
||||||
function_value (function_t *func)
|
function_value (function_t *func)
|
||||||
{
|
{
|
||||||
symbol_t *ret = 0;
|
symbol_t *ret = 0;
|
||||||
if (func->type->func.ret_type) {
|
if (!is_void (func->type->func.ret_type)) {
|
||||||
ret = symtab_lookup (func->locals, ".ret");
|
ret = symtab_lookup (func->locals, ".ret");
|
||||||
if (!ret || ret->table != func->locals) {
|
if (!ret || ret->table != func->locals) {
|
||||||
ret = new_symbol_type (".ret", func->type->func.ret_type);
|
ret = new_symbol_type (".ret", func->type->func.ret_type);
|
||||||
|
|
Loading…
Reference in a new issue