Skip to content

Commit

Permalink
Fix MGF parser to properly parse TITLE lines that have delimiters in …
Browse files Browse the repository at this point in the history
…them.
  • Loading branch information
mhoopmann committed Sep 14, 2022
1 parent b57509b commit 20e99ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MSToolkit/MSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ bool MSReader::readMGFFile2(const char* c, Spectrum& s){
} else if (tokens[0].find("RTINSECONDS")==0) {
s.setRTime((float)(atof(tokens[1].c_str()) / 60.0));
} else if (tokens[0].compare("TITLE")==0) {
for(size_t a=2;a<tokens.size();a++) tokens[1]+='='+tokens[a];
s.setNativeID(tokens[1].c_str());
} else if(isdigit(tokens[0][0])){
strcpy(str, tokens[0].c_str());
Expand Down

0 comments on commit 20e99ce

Please sign in to comment.