What is wrong with my dynamic array implementation?
I tried implementing a dynamic array in C but I get seg faults.
Through logging I found out that after resizing I sometimes get a random big length and capacity value. The seg fault comes from trying to access the array at the big random length to append a item.