]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - execloop.h
testcase for print(ftos(pawn.mema)) slightly changed, now not using a temporary location
[xonotic/gmqcc.git] / execloop.h
index d134f4379914eed12a171e39f471f3b8d0ac4e45..2929c2d6a501d51d7a6f7246ee86540ab99cefd6 100644 (file)
@@ -16,7 +16,7 @@
 #endif
 
 #if !defined(PRVM_ERROR)
-#   define PRVM_ERROR printf
+#   define PRVM_ERROR prog->vmerror++, printvmerr
 #endif
 
 #if !defined(PRVM_NAME)
@@ -50,7 +50,7 @@
 
                while (1)
                {
-                   prog_function  *newf;
+                   prog_section_function  *newf;
                    qcany          *ed;
                    qcany          *ptr;
 
                        case INSTR_ADDRESS:
                                if (OPA->edict < 0 || OPA->edict >= prog->entities)
                                {
-                                       PRVM_ERROR ("%s Progs attempted to address an out of bounds edict number", PRVM_NAME);
+                                       PRVM_ERROR ("%s Progs attempted to address an out of bounds edict number %i", PRVM_NAME, OPA->edict);
                                        goto cleanup;
                                }
                                if ((unsigned int)(OPB->_int) >= (unsigned int)(prog->entityfields))
                                }
                                else
                                        st = prog->code + PROG_ENTERFUNCTION(newf);
+                               if (prog->vmerror)
+                                   goto cleanup;
                                break;
 
                        case INSTR_DONE: