diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7945f99b6e6..50e91e8809e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-04-02 Tom Tromey + + * java/lang/natClassLoader.cc (findClass): Compare against `3', + not `0'. + 2002-04-02 Mark Wielaard * mauve-libgcj: add java.net.DatagramSocket.DatagramSocketTest2 to diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index 75d9e32ff2e..b98e96541b2 100644 --- a/libjava/java/lang/natClassLoader.cc +++ b/libjava/java/lang/natClassLoader.cc @@ -1,6 +1,6 @@ // natClassLoader.cc - Implementation of java.lang.ClassLoader native methods. -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation +/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. @@ -203,7 +203,8 @@ gnu::gcj::runtime::VMClassLoader::findClass (jstring name) java::lang::StringBuffer *sb = new java::lang::StringBuffer (JvNewStringLatin1("lib-")); jstring so_base_name = (sb->append (name)->toString ())->replace ('.', '-'); - while (! klass && so_base_name && so_base_name->length() > 0) + // Compare against `3' because that is the length of "lib". + while (! klass && so_base_name && so_base_name->length() > 3) { using namespace ::java::lang; Runtime *rt = Runtime::getRuntime();