diff --git a/cs-code/menu.qc b/cs-code/menu.qc index 0055a618b..0a5d4d78d 100644 --- a/cs-code/menu.qc +++ b/cs-code/menu.qc @@ -479,7 +479,6 @@ void () menu_init = InputLine_SetWidth (lanConfig_port_il, 10); lanConfig_join_il = InputLine_Create (4, 24, ' '); InputLine_SetWidth (lanConfig_join_il, 26); - input_active = NIL; //FIXME def alloc bug in qfcc switch (gametype ()) { case "netquake": do_single_player = 1; diff --git a/tools/qfcc/source/pr_def.c b/tools/qfcc/source/pr_def.c index f8e385510..8e4035b82 100644 --- a/tools/qfcc/source/pr_def.c +++ b/tools/qfcc/source/pr_def.c @@ -185,6 +185,7 @@ PR_GetDef (type_t *type, const char *name, def_t *scope, int *allocate) d->used = 1; // always `used' d->parent = def; } else if (type->aux_type->type == ev_pointer) { + //FIXME I don't think this is right for a field pointer size = PR_GetTypeSize (type->aux_type->aux_type); pr.size_fields += type->aux_type->num_parms * size; } else { @@ -194,21 +195,24 @@ PR_GetDef (type_t *type, const char *name, def_t *scope, int *allocate) } else if (type->type == ev_pointer) { dstatement_t *st; statref_t *ref; + int ofs; if (pr_scope) { st = (dstatement_t *) &G_INT (def->ofs); ref = PR_NewStatref (st, 4); ref->next = def->refs; def->refs = ref; - G_INT (def->ofs) = 1; + ofs = 1; } else { - G_INT (def->ofs) = *allocate; + ofs = *allocate; } size = PR_GetTypeSize (type->aux_type); - *allocate += type->num_parms * size; - if (type->num_parms) + if (type->num_parms) { + *allocate += type->num_parms * size; def->initialized = def->constant = 1; + G_INT (def->ofs) = ofs; + } } return def;