Commit 50585162 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix vector_push_n (it was not used but...)

parent ad7cb19d
Pipeline #9920 passed with stages
in 5 minutes and 51 seconds
......@@ -48,7 +48,8 @@ static void *_vectorPush(void **m, size_t s) {
size_t *n = (*(size_t**)m) - 2;
n[1] += s;
if (n[0] < n[1]) {
n[0] *= 2;
while (n[0] < n[1])
n[0] *= 2;
n = (size_t*)realloc(n, n[0] + 2 * sizeof(size_t));
*m= n + 2;
}
......
Supports Markdown
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