diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/params.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index ee314487c..839548045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-11-10 Barton E. Schaefer <schaefer@zsh.org> + + * 39893: Src/params.c: use arrdup_max() to show explicitly the + difference in two code branches; no functional change + 2016-11-11 Daniel Shahaf <d.s@daniel.shahaf.name> * 39874/0002 plus size=0 handling: Src/mem.c: zshcalloc: Remove diff --git a/Src/params.c b/Src/params.c index 86a094b1f..6f587a30a 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2293,10 +2293,9 @@ getarrvalue(Value v) /* Null if 1) array too short, 2) index still negative */ if (arrlen_lt(s, v->start) || v->start < 0) { - s = arrdup(nular); + s = arrdup_max(nular, 1); } else if (v->end <= v->start) { - s = arrdup_max(s, 1); - s[0] = NULL; + s = arrdup_max(nular, 0); } else { /* Copy to a point before the end of the source array: * arrdup_max will copy at most v->end - v->start elements, |