about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c5
1 files changed, 2 insertions, 3 deletions
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,