ParagraphLayout: Off-by-one error in LastOffsetOnLine()
This commit is contained in:
parent
433f08a481
commit
937ad5c6b8
@ -328,8 +328,9 @@ ParagraphLayout::LastOffsetOnLine(int32 lineIndex)
|
||||
|
||||
if (lineIndex < 0)
|
||||
lineIndex = 0;
|
||||
|
||||
if (lineIndex >= fLineInfos.CountItems() - 1)
|
||||
return CountGlyphs();
|
||||
return CountGlyphs() - 1;
|
||||
|
||||
return fLineInfos.ItemAt(lineIndex + 1).textOffset - 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user