From c45de61fcba14d0d9852b52c968c51bfce5b652c Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Tue, 19 Jul 2005 21:09:03 +0000 Subject: [PATCH] don't iterate past the end of the string, so pango_layout_get_cursor_pos() 2005-07-19 Kristian Rietveld * 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 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkentry.c | 4 ++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5b97813b2..bbd90a774a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-07-19 Kristian Rietveld + + * 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 * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b5b97813b2..bbd90a774a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-07-19 Kristian Rietveld + + * 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 * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b5b97813b2..bbd90a774a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-07-19 Kristian Rietveld + + * 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 * gtk/gtkmain.c (check_sizeof_GtkWindow, check_sizeof_GtkBox): diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index e4a43d3933..d9b91f2762 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -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);