1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix invalid read in titlebar

This commit is contained in:
Michael Vetter 2020-05-24 13:47:21 +02:00
parent a2af4c3184
commit 090732ed96

View File

@ -197,9 +197,10 @@ _title_bar_draw(void)
char *title = win_get_title(current);
mvwprintw(win, 0, 0, " %s", title);
free(title);
pos = strlen(title) + 1;
free(title);
// presence is written from the right side
// calculate it first so we have a maxposition
maxrightpos = _show_self_presence();