commit 3907b00

grunfink  ·  2026-02-14 15:46:09 +0000 UTC
parent 4099958
Fixed crash when the 'url' field is a list.
1 files changed,  +7, -0
M html.c
M html.c
+7, -0
 1@@ -275,6 +275,13 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date,
 2 
 3     const char *actor_id = xs_dict_get(actor, "id");
 4     const char *html_url = xs_dict_get_def(actor, "url", actor_id);
 5+
 6+    if (xs_is_list(html_url))
 7+        html_url = xs_list_get(html_url, 0);
 8+
 9+    if (!xs_is_string(html_url))
10+        html_url = actor_id;
11+
12     xs *href = NULL;
13 
14     if (user) {