From dba2e93f5190f53766751a8de1d50703f4b50b13 Mon Sep 17 00:00:00 2001 From: Eukara Date: Sun, 12 Apr 2020 19:14:08 +0000 Subject: [PATCH] Fix memalloc corruption between saves/changelevel git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5667 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/initlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/qclib/initlib.c b/engine/qclib/initlib.c index 4289a5cb5..afc3658be 100644 --- a/engine/qclib/initlib.c +++ b/engine/qclib/initlib.c @@ -447,6 +447,8 @@ static void PDECL PR_memfree (pubprogfuncs_t *ppf, void *memptr) void PRAddressableFlush(progfuncs_t *progfuncs, size_t totalammount) { prinst.addressableused = 0; + prinst.mfreelist = 0; + if (totalammount <= 0) //flush { totalammount = prinst.addressablesize;