From 23a193fe89c9aa8aa100eca1c9bbfd610fae53f8 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Tue, 23 Nov 2010 17:40:53 +0100 Subject: [PATCH] Complete previous commit --- src/conky.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conky.cc b/src/conky.cc index cf296d7a..33b0726e 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -2409,6 +2409,7 @@ static void main_loop(void) if (FD_ISSET(inotify_fd, &descriptors)) { /* process inotify events */ len = read(inotify_fd, inotify_buff, INOTIFY_BUF_LEN - 1); + inotify_buff[len] = 0; while (len > 0 && idx < len) { struct inotify_event *ev = (struct inotify_event *) &inotify_buff[idx]; if (ev->wd == inotify_config_wd && (ev->mask & IN_MODIFY || ev->mask & IN_IGNORED)) {