Fix to permit access to end of string

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5551 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-12-17 07:03:00 +00:00
parent 16eefe44b2
commit a3d8cbe6a8

View file

@ -200,6 +200,11 @@ _attributesAtIndexEffectiveRange(
if (index >= tmpLength) if (index >= tmpLength)
{ {
if (index == tmpLength)
{
*foundIndex = tmpLength;
return nil;
}
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"index is out of range in function " format: @"index is out of range in function "
@"_attributesAtIndexEffectiveRange()"]; @"_attributesAtIndexEffectiveRange()"];