commit 8222776
default
·
2022-12-08 06:08:53 +0000 UTC
parent 7565b8f
Little tweak to previous change to avoid a memleak.
1 files changed,
+7,
-1
M
html.c
M
html.c
+7,
-1
1@@ -367,7 +367,13 @@ d_char *build_mentions(snac *snac, char *msg)
2
3 if (type && strcmp(type, "Mention") == 0 &&
4 href && strcmp(href, snac->actor) != 0 && name) {
5- if (name[0] != '@') name = xs_str_cat(xs_str_new("@"), name);
6+ xs *s1 = NULL;
7+
8+ if (name[0] != '@') {
9+ s1 = xs_fmt("@%s", name);
10+ name = s1;
11+ }
12+
13 xs *l = xs_split(name, "@");
14
15 /* is it a name without a host? */