Skip to content

Commit

Permalink
Fix a bug whereby the code would hang if bases_file (used by HBEnergy…
Browse files Browse the repository at this point in the history
…) was not readable
  • Loading branch information
lorenzo-rovigatti committed Nov 8, 2024
1 parent e7c0d9e commit a20df96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Observables/HBEnergy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void HBEnergy::init() {
break;
case BASES_FROM_FILE: {
ifstream inp(_list_file);
if(!inp.good()) {
throw oxDNAException(Utils::sformat("HBEnergy: Can't read bases_file '%s'", _list_file));
}
while(!inp.eof()) {
int n;
inp >> n;
Expand Down

0 comments on commit a20df96

Please sign in to comment.