summaryrefslogtreecommitdiff
path: root/arr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arr.c')
-rw-r--r--arr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arr.c b/arr.c
index 5b005ef..b44935d 100644
--- a/arr.c
+++ b/arr.c
@@ -80,6 +80,8 @@ static void arr_set_len_(void **arr, size_t n, size_t item_sz) {
static void arr_set_lena_(void **arr, size_t n, size_t item_sz, Allocator *a) {
if (n == 0) {
/* OPTIM: arr_cleara */
+ *arr = NULL;
+ return;
}
arr_resva_(arr, n, item_sz, a);
arr_hdr(*arr)->len = n;