From b3463e3580bcc17c4bf76e63f7fe89ae05bd04f5 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Fri, 15 Nov 2019 15:14:03 -0800 Subject: [PATCH] getLineBoundary edge condition use <= instead of < (#13881) --- lib/ui/text/paragraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/text/paragraph.cc b/lib/ui/text/paragraph.cc index 5680735b601..2618c3f0840 100644 --- a/lib/ui/text/paragraph.cc +++ b/lib/ui/text/paragraph.cc @@ -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;