summaryrefslogtreecommitdiff
path: root/ds.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 11:38:00 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 11:38:00 -0500
commit65cbe00bc124bdc1bd83bcd42ad5fbed521412b2 (patch)
tree7b4c617e427681fd58700ba0cc06286a38a90539 /ds.c
parent4232df89b50754779814a97f374451fce2e36447 (diff)
parse workspace/symbol response
Diffstat (limited to 'ds.c')
-rw-r--r--ds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ds.c b/ds.c
index 99ad4d3..b599f36 100644
--- a/ds.c
+++ b/ds.c
@@ -100,6 +100,8 @@ static void arr_reserve_(void **arr, size_t member_size, size_t n) {
if (*arr) free(arr_hdr_(*arr));
*arr = NULL;
}
+
+ if (n == 0) return;
if (!*arr) {
// create a new array with capacity n+1