In [setAlignment:range:] always use a muable copy

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6612 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-05-23 22:56:16 +00:00
parent 22e398d303
commit 456bb4cb21

View file

@ -566,9 +566,7 @@ documentAttributes: (NSDictionary**)dict
if (value == nil)
value = [NSMutableParagraphStyle defaultParagraphStyle];
else if (!NSLocationInRange(effRange.location, range) ||
!NSLocationInRange(NSMaxRange(effRange)-1, range))
// the range is not fully enclosed in the range that is changed
else
value = [value mutableCopy];
[value setAlignment: alignment];