* src/widgets/modest-recpt-editor.c:
authorJose Dapena Paz <jdapena@igalia.com>
Tue, 31 Jul 2007 15:32:04 +0000 (15:32 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Tue, 31 Jul 2007 15:32:04 +0000 (15:32 +0000)
        * Fix some recursion errors in validation methods
          (fixes NB#64721).

pmo-trunk-r2873

src/widgets/modest-recpt-editor.c

index 3f857c8..87aaf6d 100644 (file)
@@ -467,6 +467,10 @@ is_valid_insert (const gchar *text, gint len)
                if (!quoted && ((c == g_utf8_get_char(",") || c == g_utf8_get_char (";")))) {
                        if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
                                return FALSE;
                if (!quoted && ((c == g_utf8_get_char(",") || c == g_utf8_get_char (";")))) {
                        if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
                                return FALSE;
+                       else {
+                         current = g_utf8_next_char (next_current);
+                         continue;
+                       }
                }
                if (c == 0x2022 || c == 0xfffc ||
                    c == g_utf8_get_char ("\n") ||
                }
                if (c == 0x2022 || c == 0xfffc ||
                    c == g_utf8_get_char ("\n") ||
@@ -535,6 +539,7 @@ modest_recpt_editor_on_insert_text (GtkTextBuffer *buffer,
                g_signal_stop_emission_by_name (G_OBJECT (buffer), "insert-text");
                gtk_text_buffer_insert (buffer, location, new_text, -1);
                g_free (new_text);
                g_signal_stop_emission_by_name (G_OBJECT (buffer), "insert-text");
                gtk_text_buffer_insert (buffer, location, new_text, -1);
                g_free (new_text);
+               return;
        }
 
        if (iter_has_recipient (location)) {
        }
 
        if (iter_has_recipient (location)) {