mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
oops, fix the line number doubling the /right/ way
This commit is contained in:
parent
6e4c6478a1
commit
5c9ffad6a1
2 changed files with 5 additions and 5 deletions
|
@ -319,12 +319,9 @@ PR_Get_Lineno_Addr (progs_t *pr, pr_lineno_t *lineno)
|
|||
unsigned int
|
||||
PR_Get_Lineno_Line (progs_t *pr, pr_lineno_t *lineno)
|
||||
{
|
||||
pr_auxfunction_t *f;
|
||||
|
||||
if (lineno->line)
|
||||
return lineno->line;
|
||||
f = &pr->auxfunctions[lineno->fa.func];
|
||||
return f->source_line;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pr_lineno_t *
|
||||
|
@ -373,6 +370,7 @@ PR_Get_Source_Line (progs_t *pr, unsigned int addr)
|
|||
if (!func || !fname)
|
||||
return 0;
|
||||
line = PR_Get_Lineno_Line (pr, lineno);
|
||||
line += func->source_line;
|
||||
|
||||
file = PR_Load_Source_File (pr, fname);
|
||||
|
||||
|
|
|
@ -232,7 +232,9 @@ NUM_FOR_BAD_EDICT (progs_t *pr, edict_t *e)
|
|||
int b;
|
||||
|
||||
b = (byte *) e - (byte *) * (pr)->edicts;
|
||||
b = b / pr->pr_edict_size;
|
||||
|
||||
if (pr->pr_edict_size)
|
||||
b /= pr->pr_edict_size;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue