ksh/ksh93-zerofill.dif

21 lines
584 B
Plaintext
Raw Normal View History

--- src/cmd/ksh93/bltins/typeset.c
+++ src/cmd/ksh93/bltins/typeset.c 2012-10-19 14:56:49.000000000 +0000
@@ -756,6 +756,7 @@ static int setall(char **argv,regist
}
if (tp->aflag == '-')
{
+ int oldnum;
if((flag&NV_EXPORT) && (strchr(name,'.') || nv_isvtree(np)))
errormsg(SH_DICT,ERROR_exit(1),e_badexport,name);
#if SHOPT_BSH
@@ -774,6 +775,9 @@ static int setall(char **argv,regist
else if(!(flag&NV_LJUST))
newflag &= ~NV_LJUST;
}
+ oldnum = nv_size(np);
+ if (oldnum > 0)
+ tp->argnum = oldnum;
}
else
{