audiod: Fix status item parsing for long status items.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index 45b477f..5f2dba0 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -730,6 +730,8 @@ static int read_audiod_pipe(int fd)
        ret = for_each_stat_item(buf, loaded, update_item);
        if (ret < 0)
                return ret;
+       if (ret > 0 && ret < loaded)
+               memmove(buf, buf + loaded - ret, ret);
        loaded = ret;
        return 1;
 }