Commit e095d3bf by maarten

fix in pdb2cif code

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@380 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent bb0562eb
...@@ -977,23 +977,27 @@ void PDBFileParser::PreParseInput(istream& is) ...@@ -977,23 +977,27 @@ void PDBFileParser::PreParseInput(istream& is)
for (;;) for (;;)
{ {
string type;
if (lookahead.empty()) if (lookahead.empty())
{
if (is.eof())
break;
cerr << "Line number " << lineNr << " is empty!" << endl; cerr << "Line number " << lineNr << " is empty!" << endl;
type = lookahead.substr(0, 6); getline(is, lookahead);
++lineNr;
continue;
}
string type = lookahead.substr(0, 6);
string value; string value;
if (lookahead.length() > 6) if (lookahead.length() > 6)
value = ba::trim_right_copy(lookahead.substr(6)); value = ba::trim_right_copy(lookahead.substr(6));
getline(is, lookahead);
uint32 curLineNr = lineNr; uint32 curLineNr = lineNr;
getline(is, lookahead);
++lineNr; ++lineNr;
if (type.empty())
continue;
if (kSupportedRecords.count(type) == 0) if (kSupportedRecords.count(type) == 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment