mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
initialize the meta class super class pointer correctly
This commit is contained in:
parent
0c6491712d
commit
a8e177652a
1 changed files with 3 additions and 2 deletions
|
@ -157,13 +157,14 @@ pr___obj_exec_class (progs_t *pr)
|
||||||
for (i = 0; i < symtab->cls_def_cnt; i++) {
|
for (i = 0; i < symtab->cls_def_cnt; i++) {
|
||||||
pr_class_t *class = &G_STRUCT (pr, pr_class_t, *ptr);
|
pr_class_t *class = &G_STRUCT (pr, pr_class_t, *ptr);
|
||||||
pr_class_t *meta = &G_STRUCT (pr, pr_class_t, class->class_pointer);
|
pr_class_t *meta = &G_STRUCT (pr, pr_class_t, class->class_pointer);
|
||||||
pr_type_t *val;
|
pr_class_t *val;
|
||||||
|
|
||||||
meta->class_pointer = object_ptr;
|
meta->class_pointer = object_ptr;
|
||||||
if (class->super_class) {
|
if (class->super_class) {
|
||||||
val = Hash_Find (pr->classes, PR_GetString (pr,
|
val = Hash_Find (pr->classes, PR_GetString (pr,
|
||||||
class->super_class));
|
class->super_class));
|
||||||
meta->super_class = class->super_class = val - pr->pr_globals;
|
meta->super_class = val->class_pointer;
|
||||||
|
class->super_class = POINTER_TO_PROG (pr, val);
|
||||||
} else {
|
} else {
|
||||||
pointer_t *ml = &meta->methods;
|
pointer_t *ml = &meta->methods;
|
||||||
while (*ml)
|
while (*ml)
|
||||||
|
|
Loading…
Reference in a new issue