[Webfunds-commits] java/webfunds/ricardian SSDFields.java

Ian Grigg iang@cypherpunks.ai
Thu, 12 Apr 2001 00:57:23 -0400 (AST)


iang        01/04/12 00:57:23

  Modified:    webfunds/ricardian SSDFields.java
  Log:
  fix slash bug

Revision  Changes    Path
1.2       +3 -3      java/webfunds/ricardian/SSDFields.java

Index: SSDFields.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/SSDFields.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SSDFields.java	2001/04/06 22:44:02	1.1
+++ SSDFields.java	2001/04/12 04:57:23	1.2
@@ -1,5 +1,5 @@
 /*
- * $Id: SSDFields.java,v 1.1 2001/04/06 22:44:02 iang Exp $
+ * $Id: SSDFields.java,v 1.2 2001/04/12 04:57:23 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -56,9 +56,9 @@
         {             
             String s = urls[0];
             int slash = s.lastIndexOf('/');        // find last '/'
-            if (slash < 0)
+            if ( ! (0 <= slash && slash < s.length()-1) )
                 continue ;
-            name = s.substring(slash);          // take last thing after '/'
+            name = s.substring(slash + 1);         // take last thing after '/'
             if ((name != null) && (name.length() > 0))
                 return name;