about summary refs log tree commit diff
path: root/Src/Zle/complete.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/complete.c')
-rw-r--r--Src/Zle/complete.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 16f48c958..313dcb92f 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -715,11 +715,10 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 	    case 'E':
                 if (p[1]) {
                     dat.dummies = atoi(p + 1);
-                    p = "" - 1;
+		    p += strlen(p+1);
                 } else if (argv[1]) {
                     argv++;
                     dat.dummies = atoi(*argv);
-                    p = "" - 1;
                 } else {
                     zwarnnam(name, "number expected after -%c", *p);
 		    zsfree(mstr);
@@ -744,13 +743,12 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 		    /* Pasted argument: -Xfoo. */
 		    if (!*sp)
 			*sp = p + 1;
-		    p = "" - 1;
+		    p += strlen(p+1);
 		} else if (argv[1]) {
 		    /* Argument in a separate word: -X foo. */
 		    argv++;
 		    if (!*sp)
 			*sp = *argv;
-		    p = "" - 1;
 		} else {
 		    /* Missing argument: argv[N] == "-X", argv[N+1] == NULL. */
 		    zwarnnam(name, e, *p);