additional changes to avoid array subscript double expansion in arithmetic contexts

This commit is contained in:
Chet Ramey
2021-05-10 09:58:14 -04:00
parent 35bc7025c1
commit b304aabc92
15 changed files with 235 additions and 25 deletions
+26
View File
@@ -1026,3 +1026,29 @@ builtin_unbind_variable (vname)
}
return (unbind_variable (vname));
}
/* **************************************************************** */
/* */
/* External interface to manipulate shell options */
/* */
/* **************************************************************** */
#if defined (ARRAY_VARS)
int
set_expand_once (nval, uwp)
int nval, uwp;
{
int oa;
oa = assoc_expand_once;
#if 0 /* TAG:bash-5.2 */
if (shell_compatibility_level > 51)
#endif
{
if (uwp)
unwind_protect_int (assoc_expand_once);
assoc_expand_once = nval;
}
return oa;
}
#endif