mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Fix class type encoding.
First, the class def needed to be created before the class type, then the def space indices had to be set early, otherwise the relocs wound up with space 0 instead of the correct space.
This commit is contained in:
parent
c96718493a
commit
eb5581c7bd
2 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue