Fix wrong size in K_BHeapPush Z_Realloc

This commit is contained in:
JugadorXEI 2025-02-01 18:16:06 +01:00
parent dd45f3cd61
commit f0bf674dc0

View file

@ -394,7 +394,7 @@ boolean K_BHeapPush(bheap_t *const heap, void *const item, UINT32 value, updatei
if (heap->count >= heap->capacity)
{
size_t newarraycapacity = heap->capacity * 2;
heap->array = Z_Realloc(heap->array, newarraycapacity, PU_STATIC, NULL);
heap->array = Z_Realloc(heap->array, newarraycapacity * sizeof(bheapitem_t), PU_STATIC, NULL);
if (heap->array == NULL)
{