From c544921cc0f1a948d00e91a4821bf9537c4717d1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 2 Apr 2002 22:20:30 +0000 Subject: natClassLoader.cc (findClass): Compare against `3', not `0'. * java/lang/natClassLoader.cc (findClass): Compare against `3', not `0'. From-SVN: r51764 --- libjava/java/lang/natClassLoader.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index 75d9e32..b98e965 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(); -- cgit v1.1