mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
make sure def->space points to the space the def's location is allocated from to ensure that freeing the location works properly (fixes the bogus address triggered by prozaccoop: thanks, phrosty)
This commit is contained in:
parent
56d01ce267
commit
fac98536f0
1 changed files with 3 additions and 0 deletions
|
@ -276,6 +276,9 @@ get_def (type_t *type, const char *name, scope_t *scope,
|
|||
space = pr.near_data;
|
||||
break;
|
||||
}
|
||||
// new_def sets def->space to the scope's space, but that is generally
|
||||
// not valid for st_static or st_extern
|
||||
def->space = space;
|
||||
if (space) {
|
||||
if (type->type == ev_field && type->aux_type == &type_vector)
|
||||
def->ofs = new_location (type->aux_type, space);
|
||||
|
|
Loading…
Reference in a new issue