about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2022-06-09 13:37:51 -0700
committerBart Schaefer <schaefer@zsh.org>2022-06-09 13:37:51 -0700
commitd4955bc0f9403551503012c3f36c841210ce0cd5 (patch)
treecbd6ec48725cd5e289b0b5f52139b2d38bd88c22
parentd24ab95469fd5514e308fcb4926a218abe492082 (diff)
downloadzsh-d4955bc0f9403551503012c3f36c841210ce0cd5.tar.gz
zsh-d4955bc0f9403551503012c3f36c841210ce0cd5.tar.xz
zsh-d4955bc0f9403551503012c3f36c841210ce0cd5.zip
50359: fix bad sticky-emulation in "functions -c"
-rw-r--r--ChangeLog4
-rw-r--r--Src/builtin.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 742e7d716..dc2ec1e89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-06-09  Matthew Martin <phy1729@gmail.com>
+
+	* 50359: Src/builtin.c: fix bad sticky-emulation in "functions -c"
+
 2022-06-09  Bart Schaefer  <schaefer@zsh.org>
 
 	* 50351: Src/builtin.c: "functions -c" can set signal traps
diff --git a/Src/builtin.c b/Src/builtin.c
index 7f00d9d29..a7b7755a7 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3305,7 +3305,7 @@ bin_functions(char *name, char **argv, Options ops, int func)
 	if (newsh->redir)
 	    newsh->redir->nref++;
 	if (shf->sticky)
-	    newsh->sticky = sticky_emulation_dup(sticky, 0);
+	    newsh->sticky = sticky_emulation_dup(shf->sticky, 0);
 	/* is newsh a signal trap? (adapted from exec.c) */
 	if (!strncmp(s, "TRAP", 4)) {
 	    int signum = getsignum(s + 4);