diff --git a/Source/NSText.m b/Source/NSText.m index f206978bb..075fdc761 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -2813,7 +2813,7 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet) NSString *string = [self string]; unsigned length = [string length]; - if (proposedCharRange.location > length) + if (proposedCharRange.location >= length) { proposedCharRange.location = length; proposedCharRange.length = 0;