about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2003-03-25 19:26:10 +0000
committerWayne Davison <wayned@users.sourceforge.net>2003-03-25 19:26:10 +0000
commit34e88a0cecf4f5e94b722991d25bf88591cfaa00 (patch)
treef54afe6f28c0f05af365fd46d9ab31e4809bd77e /Src
parent75bb3e31ab6cfaf4366be4dde45b2714df83fbd3 (diff)
downloadzsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.gz
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.xz
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.zip
Fixed zjoin() when it returns an empty string that should be allocated.
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index bf4ae325d..aa2a3738b 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1770,7 +1770,7 @@ zjoin(char **arr, int delim, int heap)
     for (s = arr; *s; s++)
 	len += strlen(*s) + 1;
     if (!len)
-	return "";
+	return heap? "" : ztrdup("");
     ptr = ret = (heap ? (char *) hcalloc(len) : (char *) zcalloc(len));
     for (s = arr; *s; s++) {
 	strucpy(&ptr, *s);