VolId: remove trailing spaces in volume name.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Dec 2004 07:14:50 +0000 (07:14 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Dec 2004 07:14:50 +0000 (07:14 +0000)
TFluka/TFluka.cxx

index 261289c..197df36 100644 (file)
@@ -1563,7 +1563,12 @@ Int_t TFluka::VolId(const Text_t* volName) const
 // Time consuming. (Only used during set-up)
 // Could be replaced by hash-table
 //
-   return fMCGeo->VolId(volName);
+    char sname[20];
+    Int_t len;
+    strncpy(sname, volName, len = strlen(volName));
+    sname[len] = 0;
+    while (sname[len - 1] == ' ') sname[--len] = 0;
+    return fMCGeo->VolId(sname);
 }
 
 //______________________________________________________________________________