From d676d1bf4bb4ca2bf7d4bcc3a824940f6648f6ff Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Thu, 10 Nov 2016 21:01:32 -0800 Subject: 39893: use arrdup_max() to show explicitly the difference in two code branches no functional change --- Src/params.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Src/params.c') 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, -- cgit v1.2.3