From: Miguel <mig...@us...> - 2005-11-28 16:20:47
|
Update of /cvsroot/jmol/Jmol/src/org/jmol/adapter/smarter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17937/src/org/jmol/adapter/smarter Modified Files: PdbReader.java Log Message: handle mal-formed/invalid FORMUL record in 1SOM.pdb bug 1290941 Index: PdbReader.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/jmol/adapter/smarter/PdbReader.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- PdbReader.java 10 Nov 2005 15:52:39 -0000 1.40 +++ PdbReader.java 28 Nov 2005 16:20:36 -0000 1.41 @@ -423,7 +423,8 @@ int ichLeftParen = formula.indexOf('('); if (ichLeftParen >= 0) { int ichRightParen = formula.indexOf(')'); - if (ichRightParen < 0 || ichLeftParen >= ichRightParen) + if (ichRightParen < 0 || ichLeftParen >= ichRightParen || + ichLeftParen + 1 == ichRightParen ) // pick up () case in 1SOM.pdb return; // invalid formula; formula = parseTrimmed(formula, ichLeftParen + 1, ichRightParen); } |