From 34e88a0cecf4f5e94b722991d25bf88591cfaa00 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 25 Mar 2003 19:26:10 +0000 Subject: Fixed zjoin() when it returns an empty string that should be allocated. --- Src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit 1.4.1