mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Fix an ownership problem with line numbers in qfos.
This commit is contained in:
parent
5725c5124c
commit
fd765f5e62
1 changed files with 6 additions and 2 deletions
|
@ -314,8 +314,12 @@ qfo_from_progs (pr_info_t *pr)
|
|||
|
||||
qfo_encode_functions (qfo, &def, &reloc, qfo->spaces + qfo_num_spaces,
|
||||
pr->func_head);
|
||||
qfo->lines = pr->linenos;
|
||||
if (pr->num_linenos) {
|
||||
qfo->lines = malloc (pr->num_linenos * sizeof (pr_lineno_t));
|
||||
memcpy (qfo->lines, pr->linenos,
|
||||
pr->num_linenos * sizeof (pr_lineno_t));
|
||||
qfo->num_lines = pr->num_linenos;
|
||||
}
|
||||
// strings must be done last because encoding defs and functions adds the
|
||||
// names
|
||||
qfo_init_string_space (qfo, &qfo->spaces[qfo_strings_space], pr->strings);
|
||||
|
|
Loading…
Reference in a new issue