summaryrefslogtreecommitdiffstats
path: root/Src/utils.c
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/utils.c
parent18351: new completion for antiword (diff)
downloadzsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.gz
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.bz2
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.lz
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.xz
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.tar.zst
zsh-34e88a0cecf4f5e94b722991d25bf88591cfaa00.zip
Fixed zjoin() when it returns an empty string that should be allocated.
Diffstat (limited to 'Src/utils.c')
-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);