mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
class.c:
whitespace switch.c: set up the relocations for the switch jump table properly
This commit is contained in:
parent
09a7e21d6e
commit
aa4f81b6da
2 changed files with 4 additions and 5 deletions
|
@ -188,10 +188,9 @@ class_begin (class_type_t *class_type)
|
|||
EMIT_STRING (pr_category->category_name, category->name);
|
||||
EMIT_STRING (pr_category->class_name, class->name);
|
||||
EMIT_DEF (pr_category->protocols,
|
||||
emit_protocol_list (category->protocols,
|
||||
va ("%s_%s",
|
||||
class->name,
|
||||
category->name)));
|
||||
emit_protocol_list (category->protocols,
|
||||
va ("%s_%s", class->name,
|
||||
category->name)));
|
||||
} else {
|
||||
def_t *meta_def;
|
||||
pr_class_t *meta;
|
||||
|
|
|
@ -326,7 +326,7 @@ build_switch (expr_t *sw, case_node_t *tree, int op, expr_t *sw_val,
|
|||
for (i = 0; i <= high - low; i++) {
|
||||
reloc_t *ref;
|
||||
|
||||
ref = new_reloc (G_INT (def->ofs) + i, rel_def_op);
|
||||
ref = new_reloc (def->ofs + i, rel_def_op);
|
||||
ref->next = tree->labels[i]->e.label.refs;
|
||||
tree->labels[i]->e.label.refs = ref;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue