Skip to content

Commit

Permalink
Fix for CPAttributedString bug cappuccino#245 [cappuccino#245 state:r…
Browse files Browse the repository at this point in the history
…esolved milestone:0.7]
  • Loading branch information
Ross Boucher committed Mar 25, 2009
1 parent 932aa87 commit 49accf9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Foundation/CPAttributedString.j
Expand Up @@ -20,8 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

@import <Foundation/CPObject.j>
@import <Foundation/CPString.j>
@import "CPObject.j"
@import "CPString.j"
@import "CPDictionary.j"
@import "CPRange.j"

/*! @class CPAttributedString
@ingroup foundation
Expand Down Expand Up @@ -502,7 +504,7 @@

var startingIndex = [self _indexOfEntryWithIndex:aRange.location],
startingRangeEntry = _rangeEntries[startingIndex],
endingIndex = [self _indexOfEntryWithIndex:CPMaxRange(aRange)-1],
endingIndex = [self _indexOfEntryWithIndex:MAX(CPMaxRange(aRange)-1, 0)],
endingRangeEntry = _rangeEntries[endingIndex],
additionalLength = aString.length - aRange.length;

Expand Down

0 comments on commit 49accf9

Please sign in to comment.