diff options
author | fvogel <fvogelnew1@free.fr> | 2017-01-01 20:56:48 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-01-01 20:56:48 (GMT) |
commit | f85e7916a82767bfc0f9fdffbc13edb698456c06 (patch) | |
tree | 84a19a6071d6cd40efcef8fc0c19954f8b3253e1 /macosx/tkMacOSXFont.c | |
parent | e10f92249af8322f5e4d9f1fae6bcdd21f00924d (diff) | |
download | tk-f85e7916a82767bfc0f9fdffbc13edb698456c06.zip tk-f85e7916a82767bfc0f9fdffbc13edb698456c06.tar.gz tk-f85e7916a82767bfc0f9fdffbc13edb698456c06.tar.bz2 |
Fix [28a4535fa2]: Off-by-1 error on text widget index on OS X
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-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..db36731 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)]]) { |