about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-06-26 10:04:09 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-06-26 10:04:09 +0000
commitbd50a3c516f3e19c444c40987e657d1be78583c0 (patch)
tree96b6046895811d782a5c8cc1e4ae4a7312a3c49f
parent66b58d9c21702fdc39c722d27b4ea149f6221945 (diff)
downloadzsh-bd50a3c516f3e19c444c40987e657d1be78583c0.tar.gz
zsh-bd50a3c516f3e19c444c40987e657d1be78583c0.tar.xz
zsh-bd50a3c516f3e19c444c40987e657d1be78583c0.zip
22516: error in func() didn't pop command stack
-rw-r--r--ChangeLog3
-rw-r--r--Src/parse.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 75b74a639..5a95c227a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-06-26  Peter Stephenson  <pws@csr.com>
 
+	* 22516: Src/parse.c: error evaluating "func()" didn't pop
+	the command stack.
+
 	* 22501: README: missed this bit.
 
 2006-06-24  Clint Adams  <clint@zsh.org>
diff --git a/Src/parse.c b/Src/parse.c
index d436eef18..c67561be2 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1672,6 +1672,7 @@ par_simple(int *complex, int nr)
 		    lineno += oldlineno;
 		    ecnpats = onp;
 		    ecssub = oecssub;
+		    cmdpop();
 		    YYERROR(oecused);
 		}
 		yylex();
@@ -1683,8 +1684,10 @@ par_simple(int *complex, int nr)
 		pl = ecadd(WCB_PIPE(WC_PIPE_END, 0));
 
 		par_cmd(&c);
-		if (!c)
+		if (!c) {
+		    cmdpop();
 		    YYERROR(oecused);
+		}
 
 		set_sublist_code(sl, WC_SUBLIST_END, 0, ecused - 1 - sl, c);
 		set_list_code(ll, (Z_SYNC | Z_END), c);