diff options
Diffstat (limited to 'cue-bin-split.c')
-rw-r--r-- | cue-bin-split.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cue-bin-split.c b/cue-bin-split.c index 644ea7d..4b47701 100644 --- a/cue-bin-split.c +++ b/cue-bin-split.c @@ -148,13 +148,16 @@ int main(int argc, char **argv) MIN(sizeof(buffer)/sample_size, (finish_sample - i)), fin); - if (feof(fin)) - break; - - if (ferror(fin)) + if (items == 0) { - perror("fread"); - break; + if (feof(fin)) + break; + + if (ferror(fin)) + { + perror("fread"); + break; + } } if (fwrite(buffer, sample_size, items, fout) != items) |