* 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

@ -1,3 +1,9 @@
2013-01-27 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextContainer.m (lineFragmentRectForProposedRect:...):
Prevent negative width/height from being returned.
Bug found by unit test from Nikolaus Schaller <hns@computer.org>.
2013-01-25 12:58-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSPopUpButtonCell.m: Revert previous change.

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