Author: paullanders
Date: Thu Jan 29 19:22:17 2015
New Revision: 38306
URL: http://svn.gna.org/viewcvs/gnustep?rev=38306&view=rev
Log:
Changed == to >= to fix a crash when layout_char is beyond the length of the
string.
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m?rev=38306&r1=38305&r2=38306&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m Thu Jan
29 19:22:17 2015
@@ -2636,7 +2636,7 @@
if (!layout_char)
new_last_glyph = 0;
- else if (layout_char == [_textStorage length])
+ else if (layout_char >= [_textStorage length])
new_last_glyph = [self numberOfGlyphs];
else
new_last_glyph = [self glyphRangeForCharacterRange:
NSMakeRange(layout_char, 1)
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs