1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

nv_associative(): clarify value indicating enum (re: 6b9703ff)

This commit is contained in:
Martijn Dekker 2021-11-20 05:57:07 +01:00
parent e554a07c56
commit 893c6a9068

View file

@ -1777,12 +1777,11 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
if(sh.subshell)
np = sh_assignok(np,1);
/*
* type == 0x26 == NV_INTEGER|NV_LTOU|NV_RJUST (see include/nval.h) indicates an
* type == NV_UINT16 (16-bit unsigned integer, see include/nval.h) indicates an
* associative array of a type created by the enum command. nelem should not be
* increased in that case or 'unset' will fail to completely unset such an array.
*/
if(type != (NV_INTEGER|NV_LTOU|NV_RJUST)
&& (!ap->header.scope || !nv_search(sp,dtvnext(ap->header.table),0)))
if(type != NV_UINT16 && (!ap->header.scope || !nv_search(sp,dtvnext(ap->header.table),0)))
ap->header.nelem++;
if(nv_isnull(mp))
{