mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Little tweak to previous change to avoid a memleak.
This commit is contained in:
parent
7565b8f397
commit
8222776ff9
1 changed files with 7 additions and 1 deletions
8
html.c
8
html.c
|
@ -367,7 +367,13 @@ d_char *build_mentions(snac *snac, char *msg)
|
||||||
|
|
||||||
if (type && strcmp(type, "Mention") == 0 &&
|
if (type && strcmp(type, "Mention") == 0 &&
|
||||||
href && strcmp(href, snac->actor) != 0 && name) {
|
href && strcmp(href, snac->actor) != 0 && name) {
|
||||||
if (name[0] != '@') name = xs_str_cat(xs_str_new("@"), name);
|
xs *s1 = NULL;
|
||||||
|
|
||||||
|
if (name[0] != '@') {
|
||||||
|
s1 = xs_fmt("@%s", name);
|
||||||
|
name = s1;
|
||||||
|
}
|
||||||
|
|
||||||
xs *l = xs_split(name, "@");
|
xs *l = xs_split(name, "@");
|
||||||
|
|
||||||
/* is it a name without a host? */
|
/* is it a name without a host? */
|
||||||
|
|
Loading…
Reference in a new issue