027864af1e
final bug patches for vector.h
dcrubro2026-08-19 23:32:09 +02:00
2c47529d05
destroy takes **vec instead of *vec, NULLs on op
dcrubro2026-08-19 23:18:38 +02:00
f74f05eb29
fixing blatantly wrong guarantees and behaviour
dcrubro2026-08-19 22:58:34 +02:00
d912d6d559
added guard to vector_prune() to check that element_size > 0
dcrubro2026-08-19 22:23:52 +02:00
8af8473c72
Fixed vector_push_back() call to use memmove() instead of memcpy() - allows for region overlap
dcrubro2026-08-19 22:15:16 +02:00
195e133303
fixed vector_reserve() on the edge case where wrapping to 0 would return 0 as if the reservation succeeded - caused a heap overflow
dcrubro2026-08-19 22:13:42 +02:00
b8d45ad32a
added vector_take_at() (and take_back()) which removes like pop() without destructor calling, and copies into supplied pointer - ownership transfer
dcrubro2026-08-19 22:02:43 +02:00