aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-04-09 22:07:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-04-09 22:07:41 +0800
commit73f6d42fbdab7797f61832db9540c65edb582b59 (patch)
tree51e774800bb55a035fe75a8ce29c485d1c9a55ab /composer
parent1de8639166cbe9e2b10a0d457cf537a773e26700 (diff)
downloadgsoc2013-evolution-73f6d42fbdab7797f61832db9540c65edb582b59.tar.gz
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')
-rw-r--r--composer/ChangeLog12
-rw-r--r--composer/e-msg-composer-hdrs.c6
-rw-r--r--composer/e-msg-composer.c6
3 files changed, 19 insertions, 5 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 83f79a2674..2052a76666 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
Fixes bug #3980.
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index c811d2d24b..bfc9b6fbaf 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -665,7 +665,7 @@ set_recipients_from_destv (CamelMimeMessage *msg,
seen_hidden_list = TRUE;
}
- camel_address_unformat (CAMEL_ADDRESS (target), text_addr);
+ camel_address_decode (CAMEL_ADDRESS (target), text_addr);
}
}
}
@@ -681,7 +681,7 @@ set_recipients_from_destv (CamelMimeMessage *msg,
seen_hidden_list = TRUE;
}
- camel_address_unformat (CAMEL_ADDRESS (target), text_addr);
+ camel_address_decode (CAMEL_ADDRESS (target), text_addr);
}
}
}
@@ -690,7 +690,7 @@ set_recipients_from_destv (CamelMimeMessage *msg,
for (i = 0; bcc_destv[i] != NULL; ++i) {
text_addr = e_destination_get_address (bcc_destv[i]);
if (text_addr && *text_addr) {
- camel_address_unformat (CAMEL_ADDRESS (bcc_addr), text_addr);
+ camel_address_decode (CAMEL_ADDRESS (bcc_addr), text_addr);
}
}
}
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);