mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
make PR_RunError back up to the preceding source line if debug is availalbe
This commit is contained in:
parent
5a86b66054
commit
33e506e943
1 changed files with 8 additions and 0 deletions
|
@ -169,6 +169,14 @@ PR_RunError (progs_t * pr, const char *error, ...)
|
|||
vsnprintf (string, sizeof (string), error, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
if (pr_debug->int_val) {
|
||||
int addr = pr->pr_xstatement;
|
||||
|
||||
while (!PR_Get_Source_Line (pr, addr))
|
||||
addr--;
|
||||
while (addr != pr->pr_xstatement)
|
||||
PR_PrintStatement (pr, pr->pr_statements + addr++);
|
||||
}
|
||||
PR_PrintStatement (pr, pr->pr_statements + pr->pr_xstatement);
|
||||
PR_StackTrace (pr);
|
||||
Con_Printf ("%s\n", string);
|
||||
|
|
Loading…
Reference in a new issue