snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit ee31fa4bae9a182943af1877e3718531d78286c8
parent d48819ded880b5d9917f5e01414a5983ce6d5d16
Author: default <nobody@localhost>
Date:   Sat, 12 Aug 2023 18:42:11 +0200

Fixed crash.

Diffstat:
Mmastoapi.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mastoapi.c b/mastoapi.c @@ -1463,10 +1463,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, ins = xs_dict_append(ins, "urls", d1); xs *z = xs_number_new(0); - d1 = xs_dict_append(d1, "user_count", z); - d1 = xs_dict_append(d1, "status_count", z); - d1 = xs_dict_append(d1, "domain_count", z); - ins = xs_dict_append(ins, "stats", d1); + xs *d2 = xs_dict_append(xs_dict_new(), "user_count", z); + d2 = xs_dict_append(d2, "status_count", z); + d2 = xs_dict_append(d2, "domain_count", z); + ins = xs_dict_append(ins, "stats", d2); ins = xs_dict_append(ins, "registrations", xs_stock_false); ins = xs_dict_append(ins, "approval_required", xs_stock_false);