forked from fte/fteqw
1
0
Fork 0

That should be a little safer now.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@253 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-26 06:26:50 +00:00
parent 011a4ef76b
commit b2e07ca991
1 changed files with 2 additions and 1 deletions

View File

@ -577,7 +577,8 @@ static void inline QVM_Return(qvm_t *vm, long size)
if (vm->cs+fp[1]) //this being false causes the program to quit.
Sys_Error("VM run time error: program returned to hyperspace\n");
if(fp[1]<0)
Sys_Error("VM run time error: program returned to negative hyperspace\n");
if (vm->cs+fp[1])
Sys_Error("VM run time error: program returned to negative hyperspace\n");
vm->pc=vm->cs+fp[1]; // restore PC
fp[1] = fp[0];