From: Andre Noll Date: Sun, 5 Jul 2009 08:40:55 +0000 (+0200) Subject: Fix a bug in the output of para_audioc. X-Git-Tag: v0.3.5~30 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=ffce7c91c56ba42b8546a820dff7dc78a6c4fcaf;ds=sidebyside 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. --- 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: