Skip to content

Commit 97cdf74

Browse files
authored
Merge pull request #52 from atillack/empty_string
Fix for the Windows fix of PR #26.
2 parents fda3a90 + 8c2ab0f commit 97cdf74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/parse_pdbqt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void parse_pdbqt_aux(std::istream& in, parsing_struct& p, context& c, boost::opt
344344
add_context(c, str);
345345

346346
if(str.empty()) {} // ignore ""
347+
if(str[0] == '\0') {} // ignore a different kind of emptiness (potential issues on Windows)
347348
else if(starts_with(str, "WARNING")) {} // ignore - AutoDockTools bug workaround
348349
else if(starts_with(str, "REMARK")) {} // ignore
349350
else if(starts_with(str, "BRANCH")) parse_pdbqt_branch_aux(in, str, p, c);
@@ -352,7 +353,6 @@ void parse_pdbqt_aux(std::istream& in, parsing_struct& p, context& c, boost::opt
352353
throw pdbqt_parse_error("TORSDOF keyword can be defined only once.");
353354
torsdof = parse_one_unsigned(str, "TORSDOF");
354355
}
355-
else if (str.find_first_not_of(" \t\v\r") != std::string::npos) {} // ignore lines only consisting of spaces, tabs, vertical tabs, and/or carriage returns
356356
else if(residue && starts_with(str, "END_RES"))
357357
return;
358358
else if(starts_with(str, "MODEL"))

0 commit comments

Comments
 (0)