sezero's "Bad old_size value in Z_Realloc()" patch.

This commit is contained in:
Bill Currie 2010-11-21 10:06:56 +09:00
parent 9b5277fca9
commit 204c509a43

View file

@ -238,6 +238,8 @@ Z_Realloc (memzone_t *zone, void *ptr, int size)
Sys_Error ("Z_Realloc: realloced a freed pointer");
old_size = block->size;
old_size -= sizeof (memblock_t); // account for size of block header
old_size -= 4; // space for memory trash tester
old_ptr = ptr;
Z_Free (zone, ptr);