]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - csprogs.c
fix the EndIncreaseEdicts handlers as edicts beyond num_edicts are not initialized yet
[xonotic/darkplaces.git] / csprogs.c
index d8a396756c10202ff9981deab604b046b557e3a6..bdb0e48561ac52d54ddbfa2b7f00fee9e7bf8da6 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -738,7 +738,7 @@ void CL_VM_CB_EndIncreaseEdicts(void)
        prvm_edict_t *ent;
 
        // link every entity except world
-       for (i = 1, ent = prog->edicts;i < prog->max_edicts;i++, ent++)
+       for (i = 1, ent = prog->edicts;i < prog->num_edicts;i++, ent++)
                if (!ent->priv.server->free)
                        CL_LinkEdict(ent);
 }