From e2f3a00a7853637121472c4dc254663cd6c52d1e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 22 Jan 2025 11:02:34 +0900 Subject: [PATCH] [qfcc] Fix a wrong var gaff Bloody symbol->type (pointer) vs sy_type (enum) and C's "any 0 is a pointer". --- tools/qfcc/source/expr_type.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/expr_type.c b/tools/qfcc/source/expr_type.c index 2994fe411..d73490319 100644 --- a/tools/qfcc/source/expr_type.c +++ b/tools/qfcc/source/expr_type.c @@ -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; }