mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +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
|
unsigned int
|
||||||
PR_Get_Lineno_Line (progs_t *pr, pr_lineno_t *lineno)
|
PR_Get_Lineno_Line (progs_t *pr, pr_lineno_t *lineno)
|
||||||
{
|
{
|
||||||
pr_auxfunction_t *f;
|
|
||||||
|
|
||||||
if (lineno->line)
|
if (lineno->line)
|
||||||
return lineno->line;
|
return lineno->line;
|
||||||
f = &pr->auxfunctions[lineno->fa.func];
|
return 0;
|
||||||
return f->source_line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_lineno_t *
|
pr_lineno_t *
|
||||||
|
@ -373,6 +370,7 @@ PR_Get_Source_Line (progs_t *pr, unsigned int addr)
|
||||||
if (!func || !fname)
|
if (!func || !fname)
|
||||||
return 0;
|
return 0;
|
||||||
line = PR_Get_Lineno_Line (pr, lineno);
|
line = PR_Get_Lineno_Line (pr, lineno);
|
||||||
|
line += func->source_line;
|
||||||
|
|
||||||
file = PR_Load_Source_File (pr, fname);
|
file = PR_Load_Source_File (pr, fname);
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,9 @@ NUM_FOR_BAD_EDICT (progs_t *pr, edict_t *e)
|
||||||
int b;
|
int b;
|
||||||
|
|
||||||
b = (byte *) e - (byte *) * (pr)->edicts;
|
b = (byte *) e - (byte *) * (pr)->edicts;
|
||||||
b = b / pr->pr_edict_size;
|
|
||||||
|
if (pr->pr_edict_size)
|
||||||
|
b /= pr->pr_edict_size;
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue