1
0
Fork 0
forked from fte/fteqw

------------------------------------------------------------------------

r4205 | acceptthis | 2013-02-16 19:27:13 +0000 (Sat, 16 Feb 2013) | 1 line

avoid crashing.
------------------------------------------------------------------------


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4203 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-03-12 22:56:56 +00:00
parent 3f5a390605
commit 286d9a9317
2 changed files with 2 additions and 2 deletions

View file

@ -393,7 +393,7 @@ static void PDECL PR_memfree (pubprogfuncs_t *ppf, void *memptr)
void PRAddressableFlush(progfuncs_t *progfuncs, size_t totalammount) void PRAddressableFlush(progfuncs_t *progfuncs, size_t totalammount)
{ {
prinst.addressableused = 0; prinst.addressableused = 0;
if (totalammount < 0) //flush if (totalammount <= 0) //flush
{ {
totalammount = prinst.addressablesize; totalammount = prinst.addressablesize;
// return; // return;

View file

@ -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); printf("Unable to alloc %i bytes\n", pr_progstate[0].globals_size);
} }
PRAddressableFlush(progfuncs, -1); PRAddressableFlush(progfuncs, 0);
resethunk=true; resethunk=true;
pr_progstate = PRHunkAlloc(progfuncs, sizeof(progstate_t) * maxprogs, "progstatetable"); pr_progstate = PRHunkAlloc(progfuncs, sizeof(progstate_t) * maxprogs, "progstatetable");