mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 15:30:50 +00:00
sezero's "Bad old_size value in Z_Realloc()" patch.
This commit is contained in:
parent
9b5277fca9
commit
204c509a43
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue