]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
instead, define the FILE_OFFSET_BITS part in the build environment, and remove it...
[xonotic/darkplaces.git] / prvm_cmds.c
index afe34225aa4af6db2cd08c31f22227b42cd7e8c7..01386fd8852bf6a4cb7593980a2f0d68e71cf183 100644 (file)
@@ -874,7 +874,7 @@ void VM_ftoe(void)
        VM_SAFEPARMCOUNT(1, VM_ftoe);
 
        ent = (int)PRVM_G_FLOAT(OFS_PARM0);
-       if (ent < 0 || ent >= MAX_EDICTS || PRVM_PROG_TO_EDICT(ent)->priv.required->free)
+       if (ent < 0 || ent >= prog->max_edicts || PRVM_PROG_TO_EDICT(ent)->priv.required->free)
                ent = 0; // return world instead of a free or invalid entity
 
        PRVM_G_INT(OFS_RETURN) = ent;