about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-26 08:10:33 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-26 08:10:33 +0000
commit4d656bfb0ee1ef079bd674187fecca871ceafaab (patch)
tree45af0cf50a0b8b2f12dad4b3d0064d3fa6f06f4f
parent79c4c507779934b6546a3862db967c388b1db9d8 (diff)
downloadzsh-4d656bfb0ee1ef079bd674187fecca871ceafaab.tar.gz
zsh-4d656bfb0ee1ef079bd674187fecca871ceafaab.tar.xz
zsh-4d656bfb0ee1ef079bd674187fecca871ceafaab.zip
missing allocation of list for option arguments (12066)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/computil.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5649bcd6b..09debbf7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-26  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12066: Src/Zle/computil.c: missing allocation of list for option
+ 	arguments
+	
 2000-06-25  Bart Schaefer  <schaefer@zsh.org>
 
 	* 12063: Doc/Zsh/builtins.yo, Doc/Zsh/compwid.yo,
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index a329d34d0..c33a2ef2c 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1349,6 +1349,8 @@ ca_parse_line(Cadef d, int multi, int first)
 		state.argend = argend;
 		doff = state.doff = 0;
 		state.singles = 1;
+		if (!state.oargs[state.curopt->num])
+		    state.oargs[state.curopt->num] = znewlinklist();
 		goto cont;
 	    } else {
 		state.curopt = NULL;
@@ -1423,6 +1425,9 @@ ca_parse_line(Cadef d, int multi, int first)
 	    if (sopts && nonempty(sopts))
 		state.curopt = (Caopt) uremnode(sopts, firstnode(sopts));
 
+	    if (!state.oargs[state.curopt->num])
+		state.oargs[state.curopt->num] = znewlinklist();
+
 	    ddef = state.def = state.curopt->args;
 	    dopt = state.curopt;
 	    doff = pe - line;