Range check corrected.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10438 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-07-12 06:05:11 +00:00
parent 37ecd01e4c
commit ac6507ad74
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2001-07-12 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSAttributedString.m: ([addAttributes:range:]) corrected
bogus range check (report by Michael Scheibler)
2001-07-11 Adam Fedor <fedor@gnu.org>
* Source/objc-load.m: Include objc-load.h on NeXT systems.

View file

@ -676,7 +676,7 @@ static Class GSMutableAttributedStringClass;
@"in class NSMutableAtrributedString"];
}
tmpLength = [self length];
if (aRange.location <= 0 || NSMaxRange(aRange) > tmpLength)
if (NSMaxRange(aRange) > tmpLength)
{
[NSException raise: NSRangeException
format: @"RangeError in method -addAttribute:value:range: "