From f4c5dc7a332b229b8efffdb66f0c219709fd6148 Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Wed, 4 Aug 2021 11:39:46 +0200 Subject: Zero the entire buffer --- mstatus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mstatus.c') diff --git a/mstatus.c b/mstatus.c index bf0029b..f9b341b 100644 --- a/mstatus.c +++ b/mstatus.c @@ -136,7 +136,7 @@ write_status(struct Block b) */ update_bar:; char buf[sb.length + (sb.count - 1) * seperator.len + 2]; - memset(buf, '\0', sb.length + 1); + memset(buf, '\0', sizeof(buf)); /* Double for loops so that the seperator isnt printed to the left of the first block */ int i; -- cgit v1.2.3