aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index e0694cbc6b..4fc773e77e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -124,15 +124,22 @@ internet_address_new_from_string (const gchar *string)
*/
InternetAddress *ia;
gchar *name = NULL, *address = NULL;
- gchar *ptr, *padding = NULL;
+ const gchar *ptr;
+ const gchar *padding;
gboolean in_quotes = FALSE;
gboolean name_first = FALSE;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (*string != '\0', NULL);
+
+ padding = NULL;
+
+ ptr = string;
+ while (isspace (*ptr))
+ ptr++;
/* look for padding between parts... */
- for (ptr = (gchar *) string; *ptr; ptr++) {
+ for (; *ptr; ptr++) {
if (*ptr == '"') {
in_quotes = !in_quotes;
name_first = TRUE;