Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Test for EOF at beginning of file--exit gracefully #63

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
View
@@ -156,7 +156,7 @@ int main (int argc, char **argv) {
{
for (i=0;i<in_n;++i) {
char c=getc(fin[i]);
- if (c != '@') {
+ if (c != '@' && c != EOF) {
fprintf(stderr, "%s doesn't appear to be a fastq file (%c)\n", in[i], c);
return 1;
}