From 797fb69a9d2026e485b8604dbb3d12f1ec329c8b Mon Sep 17 00:00:00 2001
From: deserevi <deserevi@nptool>
Date: Wed, 22 Dec 2010 12:50:48 +0000
Subject: [PATCH] * Fix bug in NPNucleus    + when finding a specific isotope,
 the size of the symbol is now taken      into account: 31S and 31S are now
 well treated for example.

---
 NPLib/Tools/NPNucleus.cxx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/NPLib/Tools/NPNucleus.cxx b/NPLib/Tools/NPNucleus.cxx
index 3deac59b3..abd0ccfaf 100644
--- a/NPLib/Tools/NPNucleus.cxx
+++ b/NPLib/Tools/NPNucleus.cxx
@@ -35,13 +35,13 @@ using namespace NPL;
 Nucleus::Nucleus()
 {
    //----------- Default Constructor ----------
-   fName	 	 = "XX DEFAULT XX"	;
-   fCharge	 	 = 0				;
-   fAtomicWeight = 0				;
-   fMassExcess	 = 0				;
-   fSpinParity	 = ""				;
-   fSpin	 	 = 0				;
-   fParity	 	 = ""				;
+   fName	 = "XX DEFAULT XX";
+   fCharge	 = 0;
+   fAtomicWeight = 0;
+   fMassExcess	 = 0;
+   fSpinParity	 = "";
+   fSpin	 = 0;
+   fParity	 = "";
 }
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
@@ -63,7 +63,7 @@ Nucleus::Nucleus(string isotope)
       while (!inFile.eof()) {
          getline(inFile,line);
 	 s_name = line.substr(11,6);
-	 if (s_name.find(Isotope) != string::npos) break;
+	 if (s_name.find(Isotope) != string::npos && s_name.length() == isotope.length()) break;
       }
       Extract(line.data());
    }
-- 
GitLab