Index: java/text/AttributedStringIterator.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/AttributedStringIterator.java,v retrieving revision 1.7 diff -u -r1.7 AttributedStringIterator.java --- java/text/AttributedStringIterator.java 23 Apr 2004 16:03:10 -0000 1.7 +++ java/text/AttributedStringIterator.java 13 Jun 2005 17:53:31 -0000 @@ -1,5 +1,5 @@ /* AttributedStringIterator.java -- Class to iterate over AttributedString - Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -228,7 +228,7 @@ for (int i = 0; i < attribs.length; ++i) { if (pos >= attribs[i].begin_index && - pos <= attribs[i].end_index) + pos < attribs[i].end_index) { Iterator iter = attribute_set.iterator(); while(iter.hasNext()) @@ -242,7 +242,7 @@ if (hit) return runLimit; else - return -1; + return ci.getEndIndex(); } /*************************************************************************/