From e47e17a810962a20d9483222ee2908071c89984c Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 6 Dec 2022 14:31:32 -0500 Subject: fix arr_set_len_, more future features --- arr.c | 2 +- main.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arr.c b/arr.c index ae25a3c..d092e68 100644 --- a/arr.c +++ b/arr.c @@ -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; } diff --git a/main.c b/main.c index dbc49d5..c2e98dd 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,11 @@ /* FUTURE FEATURES: +- regenerate tags for completion too if there are no results - config variables +- bind key to multiple commands - plugins? +- keyboard macros + - ctrl+9/0 to inc/dec number would be useful here */ #include "base.h" -- cgit v1.2.3