mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-14 15:40:51 +02:00
additional changes to avoid array subscript double expansion in arithmetic contexts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user