We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25d4600 commit 4383e49Copy full SHA for 4383e49
src/fastqreader.cpp
@@ -251,10 +251,13 @@ void FastqReader::getLine(string* line){
251
while(true) {
252
readToBuf();
253
start = 0;
254
+ end = 0;
255
// handle the case that \r or \n in the start of buf
- while(start < mBufDataLen && (mFastqBuf[start] == '\r' || mFastqBuf[start] == '\n'))
256
- start++;
257
- end = start;
+ if(line->empty()) {
+ while(start < mBufDataLen && (mFastqBuf[start] == '\r' || mFastqBuf[start] == '\n'))
258
+ start++;
259
+ end = start;
260
+ }
261
while(end < mBufDataLen) {
262
if(mFastqBuf[end] != '\r' && mFastqBuf[end] != '\n')
263
end++;
0 commit comments