diff --git a/notify.c b/notify.c index f8c2bfe1..b16b941b 100644 --- a/notify.c +++ b/notify.c @@ -63,8 +63,10 @@ consume_stdout(struct notification *notif, bool eof) left -= len + (eol != NULL ? 1 : 0); } - memmove(notif->stdout_data, data, left); - notif->stdout_sz = left; + if (left > 0) { + memmove(notif->stdout_data, data, left); + notif->stdout_sz = left; + } } static bool