From 1f8b1eb740391941e79e1004ad041f8178a2b674 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 20 Feb 2020 18:11:08 +0100 Subject: Allow utf8 symbols as omemo/pgp/otr indicator char Fix https://github.com/profanity-im/profanity/issues/1264 --- src/ui/buffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui/buffer.c') diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 86f87563..448c11ae 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -81,11 +81,11 @@ buffer_free(ProfBuff buffer) } void -buffer_append(ProfBuff buffer, const char show_char, int pad_indent, GDateTime *time, +buffer_append(ProfBuff buffer, const char *show_char, int pad_indent, GDateTime *time, int flags, theme_item_t theme_item, const char *const display_from, const char *const message, DeliveryReceipt *receipt, const char *const id) { ProfBuffEntry *e = malloc(sizeof(struct prof_buff_entry_t)); - e->show_char = show_char; + e->show_char = strdup(show_char); e->pad_indent = pad_indent; e->flags = flags; e->theme_item = theme_item; @@ -163,6 +163,7 @@ buffer_get_entry_by_id(ProfBuff buffer, const char *const id) static void _free_entry(ProfBuffEntry *entry) { + free(entry->show_char); free(entry->message); free(entry->display_from); free(entry->id); -- cgit 1.4.1-2-gfad0