Skip to content

Commit

Permalink
Also the last parameter must be an IAtom
Browse files Browse the repository at this point in the history
Change-Id: Ieaf5ae528623e558b2ab0eb5d240d9cfa9035bff
  • Loading branch information
egonw committed May 15, 2012
1 parent 2a2aecc commit 3d0b0e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/org/openscience/cdk/DefaultChemObjectBuilder.java
Expand Up @@ -421,7 +421,8 @@ private <T extends ICDKObject>T newElectronContainerInstance(
} else {
// the IBond(IAtom[]) constructor
boolean allIAtom = true;
for (int i=0; i<(params.length-1) && allIAtom; i++) {
for (int i=0; i<params.length && allIAtom; i++) {
System.out.println(params[i]);
if (!(params[i] instanceof IAtom)) allIAtom = false;
}
if (allIAtom) {
Expand Down
Expand Up @@ -414,7 +414,7 @@ private <T extends ICDKObject>T newElectronContainerInstance(
} else {
// the IBond(IAtom[]) constructor
boolean allIAtom = true;
for (int i=0; i<(params.length-1) && allIAtom; i++) {
for (int i=0; i<params.length && allIAtom; i++) {
if (!(params[i] instanceof IAtom)) allIAtom = false;
}
if (allIAtom) {
Expand Down

0 comments on commit 3d0b0e5

Please sign in to comment.