summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-06-19 03:39:01 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-06-19 03:39:01 +0000
commitc8c3ac803ae713ab55061506330925ccf49038b9 (patch)
tree6976b08dc1170130e4419fcd8b140a5ddf5555e6
parent9fccf5b6a4b72e95bc6ad5a5545ab3e03317f46b (diff)
downloadpango-c8c3ac803ae713ab55061506330925ccf49038b9.tar.gz
Bug 448342 – pango_layout_index_to_line_x() counts lines from 1
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
-rw-r--r--ChangeLog7
-rw-r--r--pango/pango-layout.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5cd54626..f898ccc1 100644
--- 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.
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index b7a7ea2f..f9bcb9b7 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)