From c8c3ac803ae713ab55061506330925ccf49038b9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 19 Jun 2007 03:39:01 +0000 Subject: [PATCH] =?utf8?q?Bug=20448342=20=E2=80=93=20pango=5Flayout=5Finde?= =?utf8?q?x=5Fto=5Fline=5Fx()=20counts=20lines=20from=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2007-06-18 Behdad Esfahbod Bug 448342 – pango_layout_index_to_line_x() counts lines from 1 * pango/pango-layout.c (pango_layout_index_to_line): Count lines from zero, not one! svn path=/trunk/; revision=2359 --- ChangeLog | 7 +++++++ pango/pango-layout.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5cd5462..f898ccc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-06-18 Behdad Esfahbod + Bug 448342 – pango_layout_index_to_line_x() counts lines from 1 + + * pango/pango-layout.c (pango_layout_index_to_line): + Count lines from zero, not one! + +2007-06-18 Behdad Esfahbod + * configure.in: * tests/cxx-test.C: Include pangocairo.h too. diff --git a/pango/pango-layout.c b/pango/pango-layout.c index b7a7ea2..f9bcb9b 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -1428,7 +1428,7 @@ pango_layout_index_to_line (PangoLayout *layout, GSList *line_list; PangoLayoutLine *line = NULL; PangoLayoutLine *prev_line = NULL; - int i = 0; + int i = -1; line_list = tmp_list = layout->lines; while (tmp_list) -- 2.7.4