diff options
author | Not Zed <NotZed@Ximian.com> | 2002-04-09 22:07:41 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-04-09 22:07:41 +0800 |
commit | 73f6d42fbdab7797f61832db9540c65edb582b59 (patch) | |
tree | 51e774800bb55a035fe75a8ce29c485d1c9a55ab /composer/e-msg-composer.c | |
parent | 1de8639166cbe9e2b10a0d457cf537a773e26700 (diff) | |
download | gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.gz gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.bz2 gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.lz gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.xz gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.zst gsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.zip |
Use decode rather than unformat - the e_destination was changed (long time
2002-04-09 Not Zed <NotZed@Ximian.com>
* 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
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |