From b8357d8f66168da083a44c69afbca53fccca26d2 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 < (flutter/engine#13881) --- engine/src/flutter/lib/ui/text/paragraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/lib/ui/text/paragraph.cc b/engine/src/flutter/lib/ui/text/paragraph.cc index 5680735b601..2618c3f0840 100644 --- a/engine/src/flutter/lib/ui/text/paragraph.cc +++ b/engine/src/flutter/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;