fixed reallocate not preserving custom metadata

This commit is contained in:
2026-06-11 15:49:33 +02:00
parent 0a582ffebc
commit e46565edbf

View File

@@ -272,6 +272,8 @@ void* MIHP_Reallocate(MIHP_Heap* heap, void* ptr, size_t newSize)
for (size_t i = 0; i < segment->OccupiedSize; i++)
((char*)newPtr)[i] = ((char*)ptr)[i];
MIHP_SetPointerCustomMetadata(heap, newPtr, segment->CustomMetadata);
MIHP_Free(heap, ptr);
return newPtr;
}