diff --git a/Source/GSTextStorage.m b/Source/GSTextStorage.m index 3023078ea..b3133044d 100644 --- a/Source/GSTextStorage.m +++ b/Source/GSTextStorage.m @@ -200,6 +200,11 @@ _attributesAtIndexEffectiveRange( if (index >= tmpLength) { + if (index == tmpLength) + { + *foundIndex = tmpLength; + return nil; + } [NSException raise: NSRangeException format: @"index is out of range in function " @"_attributesAtIndexEffectiveRange()"];