getLineBoundary edge condition use <= instead of < (flutter/engine#13881)

This commit is contained in:
Gary Qian 2019-11-15 15:14:03 -08:00 committed by GitHub
parent 107e7e22b5
commit b8357d8f66

View File

@ -140,7 +140,7 @@ Dart_Handle Paragraph::getLineBoundary(unsigned offset) {
int line_start = -1;
int line_end = -1;
for (txt::LineMetrics& line : metrics) {
if (offset >= line.start_index && offset < line.end_index) {
if (offset >= line.start_index && offset <= line.end_index) {
line_start = line.start_index;
line_end = line.end_index;
break;