2005-09-28 [paul] 1.9.14cvs59
[claws.git] / src / gtk / gtkaspell.c
index ad834db0cb8e6abd7feaeea78c99c3cea182db46..18de6b3f83705bda478f738a992b07691bce4bcf 100644 (file)
@@ -1043,7 +1043,7 @@ static gboolean get_word_from_pos(GtkAspell *gtkaspell, gint pos,
                                gtkaspell->gtkaspeller->dictionary->encoding);
                        g_free(tmp);
                        strncpy(buf, conv, buflen-1);
-                       buf[buflen]='\0';
+                       buf[buflen-1]='\0';
                        g_free(conv);
                } else
                        return FALSE;
@@ -2430,9 +2430,11 @@ static void change_color(GtkAspell * gtkaspell,
        if (color)
                gtk_text_buffer_apply_tag_by_name(buffer, "misspelled",
                                                  &startiter, &enditer);
-       else
+       else {
+               gtk_text_iter_forward_char(&enditer);
                gtk_text_buffer_remove_tag_by_name(buffer, "misspelled",
                                                   &startiter, &enditer);
+       }
 }
 
 /* convert_to_aspell_encoding () - converts ISO-8859-* strings to iso8859-*