aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/ename
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-17 05:52:05 +0800
committerDan Winship <danw@src.gnome.org>2003-03-17 05:52:05 +0800
commit94ff918c13a03c65422e8995dd6ec53fdd093fdd (patch)
treea2839a5f70733bc7df4107cca78f34942f4866fa /e-util/ename
parent1fffa41a16a749d2bb43295b587e18165ee43035 (diff)
downloadgsoc2013-evolution-94ff918c13a03c65422e8995dd6ec53fdd093fdd.tar.gz
gsoc2013-evolution-94ff918c13a03c65422e8995dd6ec53fdd093fdd.tar.zst
gsoc2013-evolution-94ff918c13a03c65422e8995dd6ec53fdd093fdd.zip
When declaring a line to be part of "extended" because we don't know what
* ename/e-address-western.c (e_address_western_parse): When declaring a line to be part of "extended" because we don't know what else to call it, keep the preceding "\n" so that the address still looks the same when we reassemble the pieces later. Fixes handling of non-US addresses svn path=/trunk/; revision=20306
Diffstat (limited to 'e-util/ename')
-rw-r--r--e-util/ename/e-address-western.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/e-util/ename/e-address-western.c b/e-util/ename/e-address-western.c
index f2200a9dba..9d325f1384 100644
--- a/e-util/ename/e-address-western.c
+++ b/e-util/ename/e-address-western.c
@@ -399,15 +399,13 @@ e_address_western_parse (const gchar *in_address)
&eaw->extended );
}
else {
- if (eaw->extended == NULL) {
- eaw->extended = g_strdup (lines[cntr]);
- }
- else {
- gchar *temp;
- temp = g_strconcat (eaw->extended, "\n", lines[cntr], NULL);
- g_free (eaw->extended);
- eaw->extended = temp;
- }
+ gchar *temp;
+ temp = g_strdup_printf (
+ "%s\n%s",
+ eaw->extended ? eaw->extended: "",
+ lines[cntr]);
+ g_free (eaw->extended);
+ eaw->extended = temp;
}
}
}