mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-16 22:10:54 +01:00
typeset: Fix leaving corrupted entries in paramtab
This commit is contained in:
parent
a44f44d6e6
commit
ed23768f77
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-06-05 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 45985: Src/builtin.c: typeset: Fix leaving corrupted entries
|
||||
in paramtab
|
||||
|
||||
2020-06-03 Yasuhiro KIMURA <yasu@utahime.org>
|
||||
|
||||
* 45950: configure.ac: Fix 'make install' in out-of-tree
|
||||
|
|
|
@ -2480,12 +2480,16 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
|
|||
return NULL;
|
||||
}
|
||||
if (on & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) {
|
||||
if (typeset_setwidth(cname, pm, ops, on, 0))
|
||||
if (typeset_setwidth(cname, pm, ops, on, 0)) {
|
||||
unsetparam_pm(pm, 0, 1);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (on & (PM_INTEGER | PM_EFLOAT | PM_FFLOAT)) {
|
||||
if (typeset_setbase(cname, pm, ops, on, 0))
|
||||
if (typeset_setbase(cname, pm, ops, on, 0)) {
|
||||
unsetparam_pm(pm, 0, 1);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (idigit(*pname))
|
||||
|
@ -2503,8 +2507,10 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
|
|||
*/
|
||||
struct tieddata *tdp = (struct tieddata *)
|
||||
zalloc(sizeof(struct tieddata));
|
||||
if (!tdp)
|
||||
if (!tdp) {
|
||||
unsetparam_pm(pm, 0, 1);
|
||||
return NULL;
|
||||
}
|
||||
tdp->joinchar = joinchar;
|
||||
tdp->arrptr = &altpm->u.arr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue