Skip to content

Commit

Permalink
Don't set mass if < 0 (-1 is now used as a sentinel value for unstabl…
Browse files Browse the repository at this point in the history
…e definitions)
  • Loading branch information
johnmay committed Aug 26, 2017
1 parent eb22423 commit 11473ec
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -906,8 +906,11 @@ void readPropertiesFast(final BufferedReader input, final IAtomContainer contain
for (int i = 0, st = 10; i < count && st + 7 <= length; i++, st += 8) {
index = readMolfileInt(line, st) - 1;
int mass = readMolfileInt(line, st + 4);
container.getAtom(offset + index).setMassNumber(mass);
}
if (mass < 0)
handleError("Absolute mass number should be >= 0, " + line);
else
container.getAtom(offset + index).setMassNumber(mass);
}
break;

// M RADnn8 aaa vvv ...
Expand Down

0 comments on commit 11473ec

Please sign in to comment.