summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/computil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index aa62cc78b..e56972cee 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2660,7 +2660,8 @@ parse_cvdef(char *nam, char **args)
     char **oargs = args, sep = '\0', asep = '=', *name, *descr, *p, *q, **xor, c;
     int xnum, multi, vtype, hassep = 0, words = 0;
 
-    while (args[0][0] == '-' &&
+    while (args && args[0] && args[1] &&
+           args[0][0] == '-' &&
            (args[0][1] == 's' || args[0][1] == 'S' || args[0][1] == 'w') &&
            !args[0][2]) {