From 73f6d42fbdab7797f61832db9540c65edb582b59 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 9 Apr 2002 14:07:41 +0000 Subject: Use decode rather than unformat - the e_destination was changed (long time 2002-04-09 Not Zed * e-msg-composer-hdrs.c (set_recipients_from_destv): Use decode rather than unformat - the e_destination was changed (long time ago) to rfc2047 encode the addresses, so we should decode likewise. Should fix #16158. * e-msg-composer.c (next_word): g_utf8_next_char never returns NULL, it just skips to the next character. So like normal string code, we just check for a nul explicitly. Fixes a bug found while checking #16158. svn path=/trunk/; revision=16396 --- composer/e-msg-composer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 1721e2104d..d269e705ff 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -4269,6 +4269,8 @@ next_word (const gchar *s, const gchar **sr) begin = s; cited = FALSE; uc = g_utf8_get_char (s); + if (uc == 0) + return NULL; s = g_utf8_next_char (s); } while (!html_selection_spell_word (uc, &cited) && !cited && s); @@ -4283,9 +4285,9 @@ next_word (const gchar *s, const gchar **sr) while (html_selection_spell_word (uc, &cited_end) || (!cited && cited_end)) { cited_end = FALSE; s = g_utf8_next_char (s); - if (!s) - break; uc = g_utf8_get_char (s); + if (uc == 0) + break; } *sr = s; return s ? g_strndup (begin, s - begin) : g_strdup (begin); -- cgit v1.2.3