diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c index 723d759da..ce7f3ca4d 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -256,6 +256,10 @@ _get_class (symbol_t *sym, int create) Hash_Add (class_hash, c); sym->sy_type = sy_class; } + + sym = class_symbol (&c->class_type, 1); + c->def = sym->s.def; + return c; } diff --git a/tools/qfcc/source/obj_file.c b/tools/qfcc/source/obj_file.c index 747043e3f..c0ced3b69 100644 --- a/tools/qfcc/source/obj_file.c +++ b/tools/qfcc/source/obj_file.c @@ -291,6 +291,13 @@ qfo_from_progs (pr_info_t *pr) def = qfo->defs; reloc = qfo->relocs; + pr->code->qfo_space = qfo_code_space; + pr->near_data->qfo_space = qfo_near_data_space; + pr->far_data->qfo_space = qfo_far_data_space; + pr->entity_data->qfo_space = qfo_entity_space; + pr->type_data->qfo_space = qfo_type_space; + pr->strings->qfo_space = qfo_strings_space; + qfo_init_code_space (qfo, &qfo->spaces[qfo_code_space], pr->code); qfo_init_data_space (qfo, &def, &reloc, &qfo->spaces[qfo_near_data_space], pr->near_data);