mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
Avoid a segfault when the called function is invalid.
This is most likely to occur when dumping code from qfo files with external functions.
This commit is contained in:
parent
f20424afe5
commit
104c29e4da
1 changed files with 3 additions and 0 deletions
|
@ -877,6 +877,9 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
|
|||
break;
|
||||
case 'F':
|
||||
str = global_string (pr, opval, optype, contents & 1);
|
||||
if (G_FUNCTION (pr, opval) >= 0
|
||||
&& G_FUNCTION (pr, opval)
|
||||
< pr->progs->numfunctions)
|
||||
call_func = pr->pr_functions + G_FUNCTION (pr, opval);
|
||||
break;
|
||||
case 'P':
|
||||
|
|
Loading…
Reference in a new issue