File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
data/src/main/java/org/openscience/cdk/formula
silent/src/main/java/org/openscience/cdk/silent Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ public IMolecularFormula addIsotope(IIsotope isotope) {
113113 */
114114 @ Override
115115 public IMolecularFormula addIsotope (IIsotope isotope , int count ) {
116+ if (count == 0 )
117+ return this ;
116118 boolean flag = false ;
117119 for (IIsotope thisIsotope : isotopes ()) {
118120 if (isTheSame (thisIsotope , isotope )) {
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ public IMolecularFormula addIsotope(IIsotope isotope) {
110110 */
111111 @ Override
112112 public IMolecularFormula addIsotope (IIsotope isotope , int count ) {
113+ if (count == 0 )
114+ return this ;
113115 boolean flag = false ;
114116 for (IIsotope thisIsotope : isotopes ()) {
115117 if (isTheSame (thisIsotope , isotope )) {
You can’t perform that action at this time.
0 commit comments