Commit a137d3a1 authored by Mark Andrews's avatar Mark Andrews

multiply by element size

parent 0d8e14ff
Pipeline #9049 passed with stages
in 55 seconds
......@@ -804,7 +804,7 @@ heap_grow(struct itemheap *heap) {
size_t new_size;
new_size = heap->size += 1024;
new_array = realloc(heap->array, new_size);
new_array = realloc(heap->array, new_size * sizeof(*heap->array));
if (new_array == NULL) {
perror("realloc");
exit(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment