diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-20 18:11:08 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-20 23:36:10 +0100 |
commit | 1f8b1eb740391941e79e1004ad041f8178a2b674 (patch) | |
tree | 726eb598bfe2a99f80a239dc5b8f1c41ae5bae71 /src/ui/buffer.c | |
parent | 280b718cfb592f2eae317bf298a96a71fdf7dff9 (diff) | |
download | profani-tty-1f8b1eb740391941e79e1004ad041f8178a2b674.tar.gz |
Allow utf8 symbols as omemo/pgp/otr indicator char
Fix https://github.com/profanity-im/profanity/issues/1264
Diffstat (limited to 'src/ui/buffer.c')
-rw-r--r-- | src/ui/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |