* Source/NSTextContainer.m (lineFragmentRectForProposedRect:...):

Prevent negative width/height from being returned.
  Bug found by unit test from Nikolaus Schaller
<hns@computer.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36026 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-01-27 14:51:26 +00:00
parent 8491eaacf8
commit c7a061dff4
2 changed files with 9 additions and 1 deletions

View file

@ -448,7 +448,9 @@ framework intact.
return NSZeroRect;
}
return NSMakeRect(minx, miny, maxx - minx, maxy - miny);
return NSMakeRect(minx, miny,
(maxx > minx) ? maxx - minx : 0.0,
(maxy > miny) ? maxy - miny : 0.0);
}
- (BOOL) isSimpleRectangularTextContainer