Skip to content

Commit

Permalink
bugfix: empty lines cause troubles
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Apr 15, 2012
1 parent ff957c1 commit 771d60b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kseq.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ typedef struct __kstring_t {
seq->seq.s = (char*)malloc(seq->seq.m); \
} \
while ((c = ks_getc(ks)) != -1 && c != '>' && c != '+' && c != '@') { \
if (c == '\n') continue; /* skip empty lines */ \
seq->seq.s[seq->seq.l++] = c; /* this is safe: we always have enough space for 1 char */ \
ks_getuntil2(ks, KS_SEP_LINE, &seq->seq, 0, 1); /* read the rest of the line */ \
} \
Expand Down

1 comment on commit 771d60b

@sjackman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix issue #3?

Please sign in to comment.