summaryrefslogtreecommitdiff
path: root/arr.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-23 13:41:14 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-23 13:41:14 -0500
commit7448aa490fb843089e5785d5a80f8a07ee50f93a (patch)
treea41ae0ce912a6af1c240b28f7c08ecedcf02ff3f /arr.c
parentf8f1db1b8d6476016f0e2f03504abd87025baa99 (diff)
got directory symlinks to work in file selector
Diffstat (limited to 'arr.c')
-rw-r--r--arr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arr.c b/arr.c
index 9d2220b..2fa9b6b 100644
--- a/arr.c
+++ b/arr.c
@@ -223,7 +223,8 @@ static void arrcstr_append_strn_(char **a, char const *s, size_t s_len) {
size_t new_len = curr_len + s_len;
arr_reserve(*a, new_len + 1);
arr_set_len(*a, new_len);
- memcpy(*a + curr_len, s, s_len + 1);
+ memcpy(*a + curr_len, s, s_len);
+ (*a)[curr_len + s_len] = '\0';
}
static void arrcstr_shrink_(char **a, u32 new_len) {