oops, failed to notice that relocs on temp defs weren't being done correctly

memset wasn't such a good idea :P
This commit is contained in:
Bill Currie 2001-11-13 23:21:23 +00:00
parent cfa47717c6
commit da36feff7f

View file

@ -252,13 +252,13 @@ PR_GetTempDef (type_t *type, def_t *scope)
if (free_temps[size]) { if (free_temps[size]) {
def = free_temps[size]; def = free_temps[size];
free_temps[size] = def->next; free_temps[size] = def->next;
memset (def, 0, sizeof (def_t));
def->type = type; def->type = type;
} else { } else {
def = PR_NewDef (type, 0, scope); def = PR_NewDef (type, 0, scope);
def->ofs = *scope->alloc; def->ofs = *scope->alloc;
*scope->alloc += pr_type_size[size]; *scope->alloc += pr_type_size[size];
} }
def->freed = def->removed = def->users = 0;
def->next = temp_scope.next; def->next = temp_scope.next;
temp_scope.next = def; temp_scope.next = def;
return def; return def;