Преглед на файлове

Fixed a mistake of the previous commit (r11994). Was reading the size in the wrong place.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11995 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS преди 17 години
родител
ревизия
e535c63a84
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/common/malloc.c

+ 1 - 1
src/common/malloc.c

@@ -398,7 +398,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func )
 			head->block = NULL;
 #ifdef DEBUG_MEMMGR
 			// set freed memory to 0xDD (dead memory)
-			memset(ptr, 0xDD, block->unit_size - sizeof(struct unit_head) + sizeof(int) );
+			memset(ptr, 0xDD, head->size - sizeof(struct unit_head) + sizeof(int) );
 #endif
 			memmgr_usage_bytes -= head->size;
 			if(--block->unit_used == 0) {