Skip to content

Commit

Permalink
Fix issue causing first read name char to be sometimes omitted for ta…
Browse files Browse the repository at this point in the history
…bbed inputs
  • Loading branch information
ch4rr0 committed Jun 5, 2017
1 parent 97dd710 commit 5ce9329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pat.cpp
Expand Up @@ -1143,7 +1143,7 @@ pair<bool, int> TabbedPatternSource::nextBatchFromFile(
readbuf[readi].readOrigBuf[readbuf[readi].readOrigBufLen++] = c;
c = getc_wrapper();
}
while(c >= 0 && (c == '\n' || c == '\r')) {
while(c >= 0 && (c == '\n' || c == '\r') && readi < pt.max_buf_ - 1) {
c = getc_wrapper();
}
}
Expand Down

0 comments on commit 5ce9329

Please sign in to comment.