bash-4.3-beta2 overlay

This commit is contained in:
Chet Ramey
2013-10-10 16:17:42 -04:00
parent aaa810a212
commit 145d6930ab
116 changed files with 12457 additions and 12721 deletions
+2 -2
View File
@@ -306,8 +306,8 @@ assign_array_element_internal (entry, name, vname, sub, sublen, value, flags)
{
ind = array_expand_index (entry, sub, sublen);
/* negative subscripts to indexed arrays count back from end */
if (ind < 0)
ind = array_max_index (array_cell (entry)) + 1 + ind;
if (entry && ind < 0)
ind = (array_p (entry) ? array_max_index (array_cell (entry)) : 0) + 1 + ind;
if (ind < 0)
{
err_badarraysub (name);