From b2e07ca991ed799bdccfda513037b759f481bc8b Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 26 Sep 2004 06:26:50 +0000 Subject: [PATCH] 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 --- engine/common/qvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/common/qvm.c b/engine/common/qvm.c index 4b7698b3c..2006f6236 100644 --- a/engine/common/qvm.c +++ b/engine/common/qvm.c @@ -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];