aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/json.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-29 22:20:36 +0900
committernsfisis <nsfisis@gmail.com>2025-08-29 22:48:12 +0900
commit34181f22cd6cec033a3136a7eb3c363c9e56d449 (patch)
tree5848fefd9c42e1c436bd1519a329ee61a7deaecf /src/json.c
parent7ee8c2d11443e2531a6c701e59117204f453796f (diff)
downloadducc-34181f22cd6cec033a3136a7eb3c363c9e56d449.tar.gz
ducc-34181f22cd6cec033a3136a7eb3c363c9e56d449.tar.zst
ducc-34181f22cd6cec033a3136a7eb3c363c9e56d449.zip
fix: dangling pointer
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c
index 8abeea7..c255221 100644
--- a/src/json.c
+++ b/src/json.c
@@ -3,13 +3,16 @@
struct JsonBuilder {
StrBuilder buf;
- BOOL has_output_element[256];
+ // not supported by ducc for now
+ // BOOL has_output_element[256];
+ BOOL* has_output_element;
int depth;
};
JsonBuilder* jsonbuilder_new() {
JsonBuilder* b = calloc(1, sizeof(JsonBuilder));
strbuilder_init(&b->buf);
+ b->has_output_element = calloc(256, sizeof(BOOL));
return b;
}