Skip to content

Commit

Permalink
https://github.com/lh3/seqtk/pull/123
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Jul 19, 2023
1 parent b6f7b9a commit f746aa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ Py_ssize_t ks_getuntil2(kstream_t *ks, int delimiter, kstring_t *str, int *dret,
} else break;
}
if (delimiter == KS_SEP_LINE) {
for (i = ks->begin; i < ks->end; ++i)
if (ks->buf[i] == '\n') break;
unsigned char *sep = (unsigned char*)memchr(ks->buf + ks->begin, '\n', ks->end - ks->begin);
i = sep != NULL ? sep - ks->buf : ks->end;
} else if (delimiter > KS_SEP_MAX) {
for (i = ks->begin; i < ks->end; ++i)
if (ks->buf[i] == delimiter) break;
Expand Down

0 comments on commit f746aa0

Please sign in to comment.