summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-31 13:53:28 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-31 13:53:28 +0000
commitdc72699b6c400e530b818250c943587b3ecf663e (patch)
tree494587e43ea98b81bb6cecfb1fe3b70eaa0cf7ac /Src
parent0c9830d23c87ad2a572d2c6d16b13a34001b9634 (diff)
downloadzsh-dc72699b6c400e530b818250c943587b3ecf663e.tar.gz
zsh-dc72699b6c400e530b818250c943587b3ecf663e.tar.xz
zsh-dc72699b6c400e530b818250c943587b3ecf663e.zip
25364: fix k flag in hash subscript
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index bbacb5476..0bd909905 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1127,7 +1127,11 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w,
 		v->isarr &= ~SCANPM_WANTVALS;
 	    } else if (rev)
 		v->isarr |= SCANPM_WANTVALS;
-	    if (!down && !keymatch && ishash)
+	    /*
+	     * This catches the case where we are using "k" (rather
+	     * than "K") on a hash.
+	     */
+	    if (!down && keymatch && ishash)
 		v->isarr &= ~SCANPM_MATCHMANY;
 	}
 	*inv = ind;