[gthumb/ext] do not use tag_end before it's initialized



commit 130ab0f4146880dcb51569762aaed85206f05d36
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Sep 10 11:25:43 2009 +0200

    do not use tag_end before it's initialized

 gthumb/gth-tags-entry.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-tags-entry.c b/gthumb/gth-tags-entry.c
index 8887974..bca0c7b 100644
--- a/gthumb/gth-tags-entry.c
+++ b/gthumb/gth-tags-entry.c
@@ -91,10 +91,10 @@ get_tag_limits (GthTagsEntry  *self,
 	cursor_start = g_utf8_offset_to_pointer (text, gtk_editable_get_position (GTK_EDITABLE (self)));
 
 	if (g_utf8_get_char (cursor_start) == ',') {
-		if (cursor_start != tag_end)
+		if (cursor_start != text + strlen (text))
 			tag_start = g_utf8_next_char (cursor_start);
 		else
-			tag_start = tag_end;
+			tag_start = text + strlen (text);
 	}
 	else {
 		tag_start = g_utf8_strrchr (text, (gssize)(cursor_start - text), ',');



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]