about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2008-03-18 15:14:20 +0000
committerBart Schaefer <barts@users.sourceforge.net>2008-03-18 15:14:20 +0000
commit4625e0eabc91d3e49404a6463e9ed8b2548b05b9 (patch)
treeedbf0602f65caaf44c8571dc905822db3f37bedf /Src
parent3cd59fa065f1cb1ecda54efdc05f96303c5647eb (diff)
downloadzsh-4625e0eabc91d3e49404a6463e9ed8b2548b05b9.tar.gz
zsh-4625e0eabc91d3e49404a6463e9ed8b2548b05b9.tar.xz
zsh-4625e0eabc91d3e49404a6463e9ed8b2548b05b9.zip
24717, 24718, 24719: a 0 subscript is neither valid nor equivalent to 1
any longer, so the (i) subscript flag on an empty array needs to yield 1.
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index f7534472c..d7135c438 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1317,7 +1317,7 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w,
 	    } else
 		ta = getarrvalue(v);
 	    if (!ta || !*ta)
-		return 0;
+		return !down;
 	    len = arrlen(ta);
 	    if (beg < 0)
 		beg += len;