From b78aaee9d7412beedf47cbffda19cf874cff8eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 11 Apr 2018 09:55:28 +0200 Subject: [PATCH] Initialize window bar buffers to empty string Fixes issue #308. --- Makefile | 2 +- window.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8ce289d..9f8b6ae 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20180122 +VERSION = git-20180411 srcdir = . VPATH = $(srcdir) diff --git a/window.c b/window.c index 8c233d8..e33c1fd 100644 --- a/window.c +++ b/window.c @@ -134,7 +134,9 @@ void win_init(win_t *win) win->bar.r.size = BAR_R_LEN; /* 3 padding bytes needed by utf8_decode */ 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[0] = '\0'; win->bar.h = options->hide_bar ? 0 : barheight; INIT_ATOM_(WM_DELETE_WINDOW);