From 6d0b13dbf04532c00700f9b476315849477bfe91 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 3 Apr 2011 13:02:04 +0900 Subject: [PATCH] Resolve types whenever possible. --- tools/qfcc/source/linker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/linker.c b/tools/qfcc/source/linker.c index 6db0a395f..32adbbb58 100644 --- a/tools/qfcc/source/linker.c +++ b/tools/qfcc/source/linker.c @@ -527,7 +527,10 @@ define_def (const char *name, type_t *type, unsigned flags, int v) def = space->defs + space->num_defs++; memset (def, 0, sizeof (*def)); def->name = linker_add_string (name); - def->type = -linker_add_string (type->encoding);// this will be fixed later + def->type = -linker_add_string (type->encoding); + ref = Hash_Find (defined_type_defs, WORKSTR (-def->type)); + if (ref) + def->type = REF (ref)->offset; def->offset = defspace_alloc_loc (def_space, type_size (type)); def->flags = flags; def_space->data[def->offset].integer_var = v;