mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
set now expands the variable size, if index is outside it
This commit is contained in:
@@ -260,10 +260,14 @@ static int update_values( wcstring_list_t &list,
|
||||
*/
|
||||
long ind = indexes[i] - 1;
|
||||
const wcstring newv = values[ i ];
|
||||
if( ind < 0 || ind>=list.size() )
|
||||
if( ind < 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if ( ind >= list.size() )
|
||||
{
|
||||
list.resize( ind+1 );
|
||||
}
|
||||
|
||||
// free((void *) al_get(list, ind));
|
||||
list[ ind ] = newv;
|
||||
|
||||
Reference in New Issue
Block a user