ksh/ksh-20120801-emptyarrayinit.patch
Siteshwar Vashisht 642af4d65a Restore ksh to version 20120801
But keep alternatives as they are used in RHEL
Resolves: #1868715
2020-08-24 21:20:25 +02:00

12 lines
398 B
Diff

--- ksh-20120801/src/cmd/ksh93/sh/array.c 2014-12-11 16:39:34.253860675 -0200
+++ ksh-20120801/src/cmd/ksh93/sh/array.c 2014-12-11 16:39:40.794857083 -0200
@@ -1003,7 +1003,7 @@ Namarr_t *nv_setarray(Namval_t *np, void
ap->nelem = nelem;
ap->fun = fun;
nv_onattr(np,NV_ARRAY);
- if(fp || value)
+ if(fp || (value && value != Empty))
{
nv_putsub(np, "0", ARRAY_ADD);
if(value)