From e233f3f904e64d6ecaffdf68f8532e1587681fe3 Mon Sep 17 00:00:00 2001 From: violette Date: Fri, 19 Dec 2025 09:54:50 +0100 Subject: Some fixes. --- html.c | 9 +++++---- mastoapi.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/html.c b/html.c index f1b004b..f6c93c7 100644 --- a/html.c +++ b/html.c @@ -2500,11 +2500,12 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, shortname = xs_dict_get(m, "content"); const xs_list *items = xs_dict_get(sfrl, content); - const char *nb = xs_list_get(items, 0); - const xs_list *actors = xs_list_get(items, 1); - const char me = *xs_list_get(items, 2) == '1'; - if (!xs_is_null(nb)) { + if (!xs_is_null(items)) { + const char *nb = xs_list_get(items, 0); + const xs_list *actors = xs_list_get(items, 1); + const char me = *xs_list_get(items, 2) == '1'; + is_emoji = 1; xs *al = xs_join(actors, ",\n\t"); diff --git a/mastoapi.c b/mastoapi.c index 041f37e..d38e902 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -1174,7 +1174,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) /* NOTE: idk when there are no actor, but i encountered that bug. * Probably because of one of my previous attempts. * Keeping this just in case, can remove later */ - const char *me = actor && strcmp(actor, snac->actor) == 0 ? + const char *me = actor && snac && strcmp(actor, snac->actor) == 0 ? xs_stock(XSTYPE_TRUE) : xs_stock(XSTYPE_FALSE); int count = 1; -- cgit v1.2.3