Fixed the botched formula for attribute substring length on OS X.
This commit is contained in:
parent
3896861f39
commit
88e0a9c165
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue