diff options
author | fvogel <fvogelnew1@free.fr> | 2017-01-07 15:14:44 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-01-07 15:14:44 (GMT) |
commit | 9f76636345a893b9bfe045dbf40de723fb29a011 (patch) | |
tree | 642b880a4e70b1ec3a170b1d9c46d66b00c5c9ea /macosx | |
parent | 09433140c6105863a449e366525f67083a5295aa (diff) | |
parent | daf2eae38a06d6471872c5ff1987af418eddbfaf (diff) | |
download | tk-9f76636345a893b9bfe045dbf40de723fb29a011.zip tk-9f76636345a893b9bfe045dbf40de723fb29a011.tar.gz tk-9f76636345a893b9bfe045dbf40de723fb29a011.tar.bz2 |
Fix [28a4535fa2]: Off-by-1 error on text widget index on OS X
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXFont.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index d3e0e41..b5ae1a3 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -870,7 +870,7 @@ TkpMeasureCharsInContext( if (index <= start && !(flags & TK_WHOLE_WORDS)) { index = CTTypesetterSuggestClusterBreak(typesetter, start, maxWidth); } - cs = (index < len || (flags & TK_WHOLE_WORDS)) ? + cs = (index <= len && (flags & TK_WHOLE_WORDS)) ? whitespaceCharacterSet : lineendingCharacterSet; while (index > start && [cs characterIsMember:[string characterAtIndex:(index - 1)]]) { |