mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Fix incorrect placement of far data
All the care in aligning things was undone by not updating the calculations of the pointers.
This commit is contained in:
parent
1985b6d4fd
commit
14acfad7c4
1 changed files with 3 additions and 3 deletions
|
@ -889,8 +889,8 @@ qfo_to_progs (qfo_t *qfo, int *size)
|
|||
|
||||
progs->ofs_globals = data - (byte *) progs;
|
||||
globals = (pr_type_t*) data;
|
||||
locals = globals + qfo->spaces[qfo_near_data_space].data_size;
|
||||
far_data = locals + locals_size;
|
||||
locals = globals + locals_start;
|
||||
far_data = globals + near_data_size;
|
||||
type_data = far_data + qfo->spaces[qfo_far_data_space].data_size;
|
||||
|
||||
memcpy (strings, qfo->spaces[qfo_strings_space].d.strings,
|
||||
|
@ -947,7 +947,7 @@ qfo_to_progs (qfo_t *qfo, int *size)
|
|||
memcpy (globals, qfo->spaces[qfo_near_data_space].d.data,
|
||||
qfo->spaces[qfo_near_data_space].data_size * sizeof (pr_type_t));
|
||||
qfo->spaces[qfo_near_data_space].d.data = globals;
|
||||
// lcear locals data
|
||||
// clear locals data
|
||||
memset (locals, 0, locals_size * sizeof (pr_type_t));
|
||||
// copy far data
|
||||
memcpy (far_data, qfo->spaces[qfo_far_data_space].d.data,
|
||||
|
|
Loading…
Reference in a new issue