diff --git a/engine/qclib/initlib.c b/engine/qclib/initlib.c index 3bb1ee4eb..a62cf28a4 100644 --- a/engine/qclib/initlib.c +++ b/engine/qclib/initlib.c @@ -393,7 +393,7 @@ static void PDECL PR_memfree (pubprogfuncs_t *ppf, void *memptr) void PRAddressableFlush(progfuncs_t *progfuncs, size_t totalammount) { prinst.addressableused = 0; - if (totalammount < 0) //flush + if (totalammount <= 0) //flush { totalammount = prinst.addressablesize; // return; diff --git a/engine/qclib/pr_edict.c b/engine/qclib/pr_edict.c index d30ba6d0c..71a6c744c 100644 --- a/engine/qclib/pr_edict.c +++ b/engine/qclib/pr_edict.c @@ -2052,7 +2052,7 @@ int PDECL PR_LoadEnts(pubprogfuncs_t *ppf, char *file, float killonspawnflags) printf("Unable to alloc %i bytes\n", pr_progstate[0].globals_size); } - PRAddressableFlush(progfuncs, -1); + PRAddressableFlush(progfuncs, 0); resethunk=true; pr_progstate = PRHunkAlloc(progfuncs, sizeof(progstate_t) * maxprogs, "progstatetable");