0
0
Fork 0
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:
Bill Currie 2011-03-20 09:54:38 +09:00
parent f20424afe5
commit 104c29e4da

View file

@ -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':