validate the iter after appending to the text buffer.

2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpwidgets-utils.c (gimp_text_buffer_load):
	validate the iter after appending to the text buffer.
This commit is contained in:
Sven Neumann 2005-06-04 17:38:27 +00:00 committed by Sven Neumann
parent ed0c815b68
commit 1d59a0c818
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-06-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.c (gimp_text_buffer_load):
validate the iter after appending to the text buffer.
2005-06-04 Sven Neumann <sven@gimp.org>
* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):

View File

@ -784,6 +784,7 @@ gimp_text_buffer_load (GtkTextBuffer *buffer,
g_utf8_validate (buf, count + remaining, &leftover);
gtk_text_buffer_insert (buffer, &iter, buf, leftover - buf);
gtk_text_buffer_get_iter_at_offset (buffer, &iter, -1);
remaining = (buf + remaining + count) - leftover;
g_memmove (buf, leftover, remaining);