0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-04-11 11:51:50 +00:00

[qfcc] Fix a wrong var gaff

Bloody symbol->type (pointer) vs sy_type (enum) and C's "any 0 is a
pointer".
This commit is contained in:
Bill Currie 2025-01-22 11:02:34 +09:00
parent ce8d1467ef
commit e2f3a00a78

View file

@ -894,11 +894,13 @@ resolve_type (const expr_t *te, rua_ctx_t *ctx)
{
if (te->type == ex_symbol) {
auto sym = te->symbol;
if (sym->type == sy_name) {
if (sym->sy_type == sy_name) {
sym = symtab_lookup (current_symtab, sym->name);
if (sym && sym->sy_type == sy_type_param) {
te = sym->expr;
}
} else if (sym->sy_type == sy_type_param) {
te = sym->expr;
} else if (sym->sy_type == sy_type) {
return sym->type;
}