mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-23 19:01:06 +00:00
A bit of pointer saftey in add_defs.
Directly accessing odef after can be dangerous (probably not here, but hey), so use the defref instead.
This commit is contained in:
parent
00c87434bf
commit
33eb3f2418
1 changed files with 3 additions and 2 deletions
|
@ -479,8 +479,9 @@ add_defs (qfo_t *qfo, qfo_mspace_t *space, qfo_mspace_t *dest_space,
|
|||
ref = get_defref (odef, dest_space);
|
||||
work_defrefs[num_work_defrefs++] = ref;
|
||||
process (ref, dest_space, idef);
|
||||
odef->relocs = add_relocs (qfo, odef->relocs, odef->num_relocs,
|
||||
odef - dest_space->defs);
|
||||
REF (ref)->relocs = add_relocs (qfo, REF (ref)->relocs,
|
||||
REF (ref)->num_relocs,
|
||||
REF (ref) - dest_space->defs);
|
||||
}
|
||||
dest_space->num_defs += count;
|
||||
return count;
|
||||
|
|
Loading…
Reference in a new issue