about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Base/_arguments4
-rw-r--r--Src/Zle/computil.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 1a5fd10f5..fb28438e2 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -260,8 +260,8 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
 
       if [[ -z "$matched$mesg" ]] && _requested options &&
           { ! zstyle -t ":completion:${curcontext}:options" prefix-needed ||
-            [[ "$origpre" = [-+]* ||
-               ( -z "$aret$mesg" && nm -eq compstate[nmatches] ) ]] } ; then
+            [[ ( "$origpre" = [-+]* || -z "$aret$mesg" ) &&
+               nm -eq compstate[nmatches] ]] } ; then
 	local prevpre="$PREFIX" previpre="$IPREFIX"
 
 	PREFIX="$origpre"
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 04b12c3c2..f771357d1 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -821,7 +821,7 @@ parse_cadef(char *nam, char **args)
 		int num = 0;
 
 		while (*p && idigit(*p))
-		    num = (num * 10) + ((int) *p++);
+		    num = (num * 10) + (((int) *p++) - '0');
 
 		anum = num + 1;
 	    } else