From: <ha...@us...> - 2006-09-23 18:07:17
|
Revision: 5681 http://svn.sourceforge.net/jmol/?rev=5681&view=rev Author: hansonr Date: 2006-09-23 11:07:13 -0700 (Sat, 23 Sep 2006) Log Message: ----------- molecular formula fix -- was leaving off the last element Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Frame.java Modified: trunk/Jmol/src/org/jmol/viewer/Frame.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Frame.java 2006-09-23 16:06:08 UTC (rev 5680) +++ trunk/Jmol/src/org/jmol/viewer/Frame.java 2006-09-23 18:07:13 UTC (rev 5681) @@ -172,14 +172,14 @@ String mf = ""; String sep = ""; int nX; - for (int i = 1; i < elementNumberMax; i++) { + for (int i = 1; i <= elementNumberMax; i++) { nX = elementCounts[i]; if (nX != 0) { mf += sep + JmolConstants.elementSymbolFromNumber(i) + " " + nX; sep = " "; } } - for (int i = 1; i < altElementMax; i++) { + for (int i = 1; i <= altElementMax; i++) { nX = altElementCounts[i]; if (nX != 0) { mf += sep This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |