mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
more not-really initialized data
This commit is contained in:
parent
1dc4683961
commit
c542138300
2 changed files with 9 additions and 3 deletions
|
@ -494,7 +494,7 @@ init_space (int size, pr_type_t *data)
|
|||
space->size = size;
|
||||
space->max_size = RUP (space->size, 65536);
|
||||
if (!space->max_size)
|
||||
space->max_size=65536;
|
||||
space->max_size = 65536;
|
||||
space->data = malloc (space->max_size * sizeof (pr_type_t));
|
||||
if (size && data) {
|
||||
memcpy (space->data, data, size * sizeof (pr_type_t));
|
||||
|
|
|
@ -223,6 +223,7 @@ WriteData (int crc)
|
|||
|
||||
if (!(h = Qopen (options.output_file, "wb")))
|
||||
Sys_Error ("%s: %s\n", options.output_file, strerror(errno));
|
||||
memset (&progs, 0, sizeof (progs));
|
||||
Qwrite (h, &progs, sizeof (progs));
|
||||
|
||||
progs.ofs_strings = Qtell (h);
|
||||
|
@ -302,6 +303,7 @@ WriteData (int crc)
|
|||
if (!(h = Qopen (options.output_file, "rb")))
|
||||
Sys_Error ("%s: %s\n", options.output_file, strerror(errno));
|
||||
|
||||
memset (&debug, 0, sizeof (debug));
|
||||
debug.version = LittleLong (PROG_DEBUG_VERSION);
|
||||
CRC_Init (&debug.crc);
|
||||
while ((i = Qgetc (h)) != EOF)
|
||||
|
@ -474,8 +476,12 @@ finish_compilation (void)
|
|||
relocate_refs (def->refs, def->ofs);
|
||||
}
|
||||
}
|
||||
if (options.code.local_merging)
|
||||
new_location_size (num_localdefs, pr.near_data);
|
||||
if (options.code.local_merging) {
|
||||
int ofs;
|
||||
for (ofs = new_location_size (num_localdefs, pr.near_data);
|
||||
ofs < pr.near_data->size; ofs++)
|
||||
G_INT (ofs) = 0;
|
||||
}
|
||||
|
||||
for (l = pr.labels; l; l = l->next)
|
||||
relocate_refs (l->refs, l->ofs);
|
||||
|
|
Loading…
Reference in a new issue