about summary refs log tree commit diff
path: root/Src/Zle/computil.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2013-09-18 23:50:04 +0200
committerPeter Stephenson <pws@zsh.org>2013-09-19 09:45:45 +0100
commit844e569b632fc032576edc039f793be47fde724e (patch)
tree06b65b3960828de9569f7d1460594339fbd59576 /Src/Zle/computil.c
parent075ad840d60de2d794aea81f2ba2eb2a5473bca4 (diff)
downloadzsh-844e569b632fc032576edc039f793be47fde724e.tar.gz
zsh-844e569b632fc032576edc039f793be47fde724e.tar.xz
zsh-844e569b632fc032576edc039f793be47fde724e.zip
31735: fix off-by-one in completion utility cache code.
Was causing crashes in complex completions, particularly with taskwarrior
Diffstat (limited to 'Src/Zle/computil.c')
-rw-r--r--Src/Zle/computil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index cd508d0ac..2c323eefe 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2992,7 +2992,7 @@ get_cvdef(char *nam, char **args)
 	    return *p;
 	} else if (!min || !*p || (*p)->lastt < (*min)->lastt)
 	    min = p;
-    if (i)
+    if (i > 0)
 	min = p;
     if ((new = parse_cvdef(nam, args))) {
 	freecvdef(*min);