mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
Values being stored in an array or a hash needed to be metafied
(using META_DUP) instead of just duplicated via ztrdup().
This commit is contained in:
parent
7c9c5bff0d
commit
39b3d2b90a
1 changed files with 5 additions and 5 deletions
|
|
@ -200,7 +200,7 @@ stattimeprint(time_t tim, char *outbuf, int flags)
|
|||
ztrftime(oend, 40, timefmt, (flags & STF_GMT) ? gmtime(&tim) :
|
||||
localtime(&tim));
|
||||
if (flags & STF_RAW)
|
||||
strcat(outbuf, ")");
|
||||
strcat(oend, ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -570,11 +570,11 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
|
|||
if (iwhich > -1) {
|
||||
statprint(&statbuf, outbuf, *args, iwhich, flags);
|
||||
if (arrnam)
|
||||
*arrptr++ = ztrdup(outbuf);
|
||||
*arrptr++ = metafy(outbuf, -1, META_DUP);
|
||||
else if (hashnam) {
|
||||
/* STF_NAME explicitly turned off for ops.ind['H'] above */
|
||||
*hashptr++ = ztrdup(statelts[iwhich]);
|
||||
*hashptr++ = ztrdup(outbuf);
|
||||
*hashptr++ = metafy(outbuf, -1, META_DUP);
|
||||
} else
|
||||
printf("%s\n", outbuf);
|
||||
} else {
|
||||
|
|
@ -582,11 +582,11 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
|
|||
for (i = 0; i < ST_COUNT; i++) {
|
||||
statprint(&statbuf, outbuf, *args, i, flags);
|
||||
if (arrnam)
|
||||
*arrptr++= ztrdup(outbuf);
|
||||
*arrptr++= metafy(outbuf, -1, META_DUP);
|
||||
else if (hashnam) {
|
||||
/* STF_NAME explicitly turned off for ops.ind['H'] above */
|
||||
*hashptr++ = ztrdup(statelts[i]);
|
||||
*hashptr++ = ztrdup(outbuf);
|
||||
*hashptr++ = metafy(outbuf, -1, META_DUP);
|
||||
} else
|
||||
printf("%s\n", outbuf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue