From dbcf42527784f66f0bc7912d40e3f68a81ac42a3 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 1 Mar 2001 17:10:35 +0000 Subject: Make it handle a NULL string as an empty string. 2001-03-01 Not Zed * e-sexp.c (e_sexp_encode_string): Make it handle a NULL string as an empty string. svn path=/trunk/; revision=8448 --- e-util/ChangeLog | 5 +++++ e-util/e-sexp.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 67fc246621..35cd88d2c1 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2001-03-01 Not Zed + + * e-sexp.c (e_sexp_encode_string): Make it handle a NULL string as + an empty string. + 2001-02-23 Not Zed * e-msgport.c (e_thread_destroy): Wait a lot lot longer for 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=='\'') -- cgit v1.2.3