]> Pileus Git - ~andy/gtk/commitdiff
don't iterate past the end of the string, so pango_layout_get_cursor_pos()
authorKristian Rietveld <kris@gtk.org>
Tue, 19 Jul 2005 21:09:03 +0000 (21:09 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Tue, 19 Jul 2005 21:09:03 +0000 (21:09 +0000)
2005-07-19  Kristian Rietveld  <kris@gtk.org>

* gtk/gtkentry.c (gtk_entry_move_forward_word): don't iterate
past the end of the string, so pango_layout_get_cursor_pos() won't
complain. (#309211, Tommi Komulainen).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkentry.c

index b5b97813b29e38409e997fc1ac77f21900e19efc..bbd90a774ac3b5d79c4cdac15e0211281850ceb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-19  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_move_forward_word): don't iterate
+       past the end of the string, so pango_layout_get_cursor_pos() won't
+       complain. (#309211, Tommi Komulainen).
+
 2005-07-19  Tor Lillqvist  <tml@novell.com>
 
        * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox):
index b5b97813b29e38409e997fc1ac77f21900e19efc..bbd90a774ac3b5d79c4cdac15e0211281850ceb7 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-19  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_move_forward_word): don't iterate
+       past the end of the string, so pango_layout_get_cursor_pos() won't
+       complain. (#309211, Tommi Komulainen).
+
 2005-07-19  Tor Lillqvist  <tml@novell.com>
 
        * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox):
index b5b97813b29e38409e997fc1ac77f21900e19efc..bbd90a774ac3b5d79c4cdac15e0211281850ceb7 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-19  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_move_forward_word): don't iterate
+       past the end of the string, so pango_layout_get_cursor_pos() won't
+       complain. (#309211, Tommi Komulainen).
+
 2005-07-19  Tor Lillqvist  <tml@novell.com>
 
        * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox):
index e4a43d3933a3b1c6116f53a625786446cbc6f05e..d9b91f2762634637619870081571fabc1b577efb 100644 (file)
@@ -3600,8 +3600,8 @@ gtk_entry_move_forward_word (GtkEntry *entry,
       
       /* Find the next word boundary */
       new_pos++;
-      while (new_pos < n_attrs && !(log_attrs[new_pos].is_word_end ||
-                                    (log_attrs[new_pos].is_word_start && allow_whitespace)))
+      while (new_pos < n_attrs - 1 && !(log_attrs[new_pos].is_word_end ||
+                                        (log_attrs[new_pos].is_word_start && allow_whitespace)))
        new_pos++;
 
       g_free (log_attrs);