From bc086fe5537bd3078b920454958b61287a75c568 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 5 Jul 2009 10:40:55 +0200 Subject: [PATCH] Fix a bug in the output of para_audioc. This bites In case of short writes to stdout. The bug was literally there since day one but never showed up as short writes usually don't happen with the rather small amount of data that is written by para_audioc. --- audioc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audioc.c b/audioc.c index 666990db..5c081da5 100644 --- a/audioc.c +++ b/audioc.c @@ -151,6 +151,8 @@ int main(int argc, char *argv[]) goto out; } loaded -= ret; + if (loaded && ret) + memmove(buf, buf + ret, loaded); } } out: -- 2.39.5