Fix incorrect storing of size when using calloc

This commit is contained in:
Stephen Seo 2024-06-04 15:54:45 +09:00
parent 67d20b4673
commit 0e2545ecea

View file

@ -105,7 +105,7 @@ namespace SC_AM_Internal {
if (address != nullptr) {
Malloced *data = reinterpret_cast<Malloced*>(real_malloc(sizeof(Malloced)));
data->address = address;
data->size = size;
data->size = n * size;
ListNode::add_to_list(malloced_list_tail, data);
}