nooc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/nooc
Log | Files | Refs | LICENSE

commit b1e6dd30f644c4cb3f1bdcd9b2cfd254b7d885b8
parent 015242dbbd45b0fa2b8116bec7da08e4ed24ba9f
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Thu, 18 Nov 2021 14:44:00 -0600

array: determine item size properly

Diffstat:
Marray.h | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/array.h b/array.h @@ -2,6 +2,6 @@ _array_add((void **) &(arr->data), sizeof(new), 1, &(arr->len), &(arr->cap), &new); #define array_push(arr, new, count) \ - _array_add((void **) &(arr->data), sizeof(*new), count, &(arr->len), &(arr->cap), new); + _array_add((void **) &(arr->data), sizeof(*(arr->data)), count, &(arr->len), &(arr->cap), new); int _array_add(void **data, size_t size, size_t count, size_t *len, size_t *cap, void *new);