Bug 448342 – pango_layout_index_to_line_x() counts lines from 1
authorBehdad Esfahbod <behdad@gnome.org>
Tue, 19 Jun 2007 03:39:01 +0000 (03:39 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Tue, 19 Jun 2007 03:39:01 +0000 (03:39 +0000)
2007-06-18  Behdad Esfahbod  <behdad@gnome.org>

        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
pango/pango-layout.c

index 5cd5462..f898ccc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2007-06-18  Behdad Esfahbod  <behdad@gnome.org>
 
+       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  <behdad@gnome.org>
+
        * configure.in:
        * tests/cxx-test.C: Include pangocairo.h too.
 
index b7a7ea2..f9bcb9b 100644 (file)
@@ -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)