aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-sexp.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-03-02 01:10:35 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-03-02 01:10:35 +0800
commitdbcf42527784f66f0bc7912d40e3f68a81ac42a3 (patch)
tree67be60afa876a2b6d4660b9024d783eb47631603 /e-util/e-sexp.c
parent7c138433345c8b6b2f82dac8bf28717181b38981 (diff)
downloadgsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar.gz
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar.bz2
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar.lz
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar.xz
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.tar.zst
gsoc2013-evolution-dbcf42527784f66f0bc7912d40e3f68a81ac42a3.zip
Make it handle a NULL string as an empty string.
2001-03-01 Not Zed <NotZed@Ximian.com> * e-sexp.c (e_sexp_encode_string): Make it handle a NULL string as an empty string. svn path=/trunk/; revision=8448
Diffstat (limited to 'e-util/e-sexp.c')
-rw-r--r--e-util/e-sexp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c
index 997eb441d8..69e1c0ca15 100644
--- a/e-util/e-sexp.c
+++ b/e-util/e-sexp.c
@@ -1156,7 +1156,10 @@ e_sexp_encode_string(GString *s, const char *string)
char c;
const char *p;
- p = string;
+ if (string == NULL)
+ p = "";
+ else
+ p = string;
g_string_append(s, " \"");
while ( (c = *p++) ) {
if (c=='\\' || c=='\"' || c=='\'')