Commit 332b5eb4 authored by D-AIRY's avatar D-AIRY

Fixed MemAlloc::clearFast()

parent c7a4f320
......@@ -203,7 +203,7 @@ public:
{
for(int i = 0; i < this->NumCurBlockCount; i++)
{
if(this->memblocks[i].mem)
if(this->memblocks[i].mem && this->memblocks[i].used)
{
for(int j = 0; j < this->memblocks[i].size; j++)
{
......@@ -213,6 +213,8 @@ public:
}
this->memblocks[i].mem[j].IsFree = 0x80000000 | (j + 1);
}
this->memblocks[i].pos = 0;
this->memblocks[i].used = 0;
}
}
this->NumCurBlock = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment