mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-10 19:11:17 +01:00
18524: sepjoin !heap bug cause problem in vared
This commit is contained in:
parent
11cd9b2de3
commit
fa09beea01
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-05-12 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 18524: Src/utils.c: sepjoin didn't respect !heap for an empty
|
||||
array. Showed up when vared'ing a zero-length array.
|
||||
|
||||
2003-05-08 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 18512 (modified for 4.0): README, Completion/Unix/Command/_cvs,
|
||||
|
|
|
|||
|
|
@ -2027,7 +2027,7 @@ sepjoin(char **s, char *sep, int heap)
|
|||
char sepbuf[3];
|
||||
|
||||
if (!*s)
|
||||
return "";
|
||||
return heap ? "" : ztrdup("");
|
||||
if (!sep) {
|
||||
sep = sepbuf;
|
||||
sepbuf[0] = *ifs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue