[util] Fix a count error when resizing darrays

Turns out I had never fully tested inserts.
This commit is contained in:
Bill Currie 2021-03-09 11:35:18 +09:00
parent 14bc560624
commit 941a1267bc

View file

@ -253,7 +253,7 @@
} \
DARRAY_RESIZE (ar, ar->size + sp); \
memmove (&ar->a[po + sp], &ar->a[po], \
(ar->size - po) * sizeof (*ar->a)); \
(ar->size - po - sp) * sizeof (*ar->a)); \
&ar->a[po]; \
})