Fixed the botched formula for attribute substring length on OS X.

This commit is contained in:
Pietro Gagliardi 2016-05-26 20:48:49 -04:00
parent 3896861f39
commit 88e0a9c165
1 changed files with 1 additions and 2 deletions

View File

@ -636,8 +636,7 @@ static CFRange charsToRange(uiDrawTextLayout *layout, intmax_t startChar, intmax
start = layout->charsToRanges[startChar];
end = layout->charsToRanges[endChar];
out.location = start.location;
// - 1 to avoid including the first code point after end
out.length = (end.location + end.length - 1) - start.location;
out.length = end.location - start.location;
return out;
}