summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2012-01-04 16:38:19 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2012-01-04 16:38:19 +1100
commit6cd40d4776b0fcc70ada541934a528ac9ee2d526 (patch)
tree4799206f0e59cb63d29270930b72c43f5ac9131b /programs
parentb6743972172c3b8555e657f0d30c43ee3a221e96 (diff)
programs/sndfile-cmp.c : Catch the case where the second file has more frames than the first.
Diffstat (limited to 'programs')
-rw-r--r--programs/sndfile-cmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/programs/sndfile-cmp.c b/programs/sndfile-cmp.c
index f550d13..121d25a 100644
--- a/programs/sndfile-cmp.c
+++ b/programs/sndfile-cmp.c
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2008 Conrad Parker <conrad@metadecks.org>
**
** All rights reserved.
@@ -97,7 +97,7 @@ compare (void)
/* Calculate the framecount that will fit in our data buffers */
items = BUFLEN / sfinfo1.channels ;
- while ( (nread1 = sf_readf_double (sf1, buf1, items)) > 0)
+ while ((nread1 = sf_readf_double (sf1, buf1, items)) > 0)
{ nread2 = sf_readf_double (sf2, buf2, nread1) ;
if (nread2 != nread1)
{ retval = comparison_error ("PCM data lengths", -1) ;
@@ -112,7 +112,7 @@ compare (void)
offset += nread1 ;
} ;
- if ( (nread2 = sf_readf_double (sf2, buf2, nread1)) != 0)
+ if ((nread2 = sf_readf_double (sf2, buf2, items)) != 0)
{ retval = comparison_error ("PCM data lengths", -1) ;
goto out ;
} ;