class.c (add_assume_compiled): Don't adjust parent if we're already at the root of...
authorTom Tromey <tromey@redhat.com>
Tue, 7 Jan 2003 17:20:50 +0000 (17:20 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 7 Jan 2003 17:20:50 +0000 (17:20 +0000)
* class.c (add_assume_compiled): Don't adjust parent if we're
already at the root of tree.

From-SVN: r61003

gcc/java/ChangeLog
gcc/java/class.c

index 8f3e2aa809bc9556b6fa7c8c4fa9490a95052ae0..e8150af22172431110bd7581bcffff25147b0a08 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-07  Tom Tromey  <tromey@redhat.com>
+
+       * class.c (add_assume_compiled): Don't adjust parent if we're
+       already at the root of tree.
+
 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * lang.c (dump_compound_expr): Prototype.
index 6e1055f208b1bc736fe927a54634e98b20626a61..0818bc2107906f4be0abb9b425803555016e99f5 100644 (file)
@@ -150,6 +150,7 @@ add_assume_compiled (ident, excludep)
      const char *ident;
      int excludep;
 {
+  int len;
   assume_compiled_node *parent;
   assume_compiled_node *node = 
     xmalloc (sizeof (assume_compiled_node));
@@ -183,7 +184,8 @@ add_assume_compiled (ident, excludep)
      class or a package name.  Adjust PARENT accordingly.  */
 
   parent = find_assume_compiled_node (assume_compiled_tree, ident);
-  if (ident[strlen (parent->ident)] != '.')
+  len = strlen (parent->ident);
+  if (parent->ident[len] && parent->ident[len] != '.')
     parent = parent->parent;
 
   /* Insert NODE into the tree.  */
@@ -194,7 +196,7 @@ add_assume_compiled (ident, excludep)
 }
 
 /* Returns nonzero if IDENT is the name of a class that the compiler
-   should assume has been compiled to FIXME  */
+   should assume has been compiled to object code.  */
 
 static int
 assume_compiled (ident)