Merge branch 'bheapPushWrongRealloc' into 'master'

Fix wrong size in K_BHeapPush Z_Realloc

See merge request KartKrew/RingRacers!83
This commit is contained in:
Eidolon 2025-02-13 04:18:43 +00:00
commit 271c531223

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)
{