Initialize window bar buffers to empty string

Fixes issue #308.
This commit is contained in:
Bert Münnich 2018-04-11 09:55:28 +02:00
parent 09b04d7aef
commit b78aaee9d7
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
VERSION = git-20180122 VERSION = git-20180411
srcdir = . srcdir = .
VPATH = $(srcdir) VPATH = $(srcdir)

View File

@ -134,7 +134,9 @@ void win_init(win_t *win)
win->bar.r.size = BAR_R_LEN; win->bar.r.size = BAR_R_LEN;
/* 3 padding bytes needed by utf8_decode */ /* 3 padding bytes needed by utf8_decode */
win->bar.l.buf = emalloc(win->bar.l.size + 3); win->bar.l.buf = emalloc(win->bar.l.size + 3);
win->bar.l.buf[0] = '\0';
win->bar.r.buf = emalloc(win->bar.r.size + 3); win->bar.r.buf = emalloc(win->bar.r.size + 3);
win->bar.r.buf[0] = '\0';
win->bar.h = options->hide_bar ? 0 : barheight; win->bar.h = options->hide_bar ? 0 : barheight;
INIT_ATOM_(WM_DELETE_WINDOW); INIT_ATOM_(WM_DELETE_WINDOW);