diff options
author | pommicket <pommicket@gmail.com> | 2022-12-06 14:31:32 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-06 14:31:32 -0500 |
commit | e47e17a810962a20d9483222ee2908071c89984c (patch) | |
tree | 5b00bed8bdf5d9389ed86c44796a9ca87a9be9de /arr.c | |
parent | 8242cd817017628db85f04ebf63cd328ec1e8eb3 (diff) |
fix arr_set_len_, more future features
Diffstat (limited to 'arr.c')
-rw-r--r-- | arr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -151,7 +151,7 @@ static void arr_set_len_(void **arr, size_t member_size, size_t n) { ArrHeader *hdr = arr_hdr_(*arr); if (n > hdr->len) { // zero new elements - memset((char *)hdr->data + hdr->len, 0, (n - hdr->len) * member_size); + memset((char *)hdr->data + hdr->len * member_size, 0, (n - hdr->len) * member_size); } hdr->len = (u32)n; } |