diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-05-24 13:47:21 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-05-24 13:47:21 +0200 |
commit | 090732ed9605e0a038a7506c6b9d77c5bbb6a207 (patch) | |
tree | b5f140e9e8cba5560881db14e22ca774a1e73d2a | |
parent | a2af4c31842e36321dfc2352af7590b637f90a74 (diff) | |
download | profani-tty-090732ed9605e0a038a7506c6b9d77c5bbb6a207.tar.gz |
Fix invalid read in titlebar
-rw-r--r-- | src/ui/titlebar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 9c8adfe5..915faa6a 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -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(); |