diff options
Diffstat (limited to 'builtin_set.c')
-rw-r--r-- | builtin_set.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin_set.c b/builtin_set.c index 650edf72..88e8fef9 100644 --- a/builtin_set.c +++ b/builtin_set.c @@ -274,11 +274,11 @@ static int update_values( array_list_t *list, { /* The '- 1' below is because the indices in fish are - one-based, but the array_lsit_t uses zero-based indices + one-based, but the array_list_t uses zero-based indices */ long ind = al_get_long(indexes, i) - 1; void *new = (void *) al_get(values, i); - if( ind <= 0 ) + if( ind < 0 ) { return 1; } |