summaryrefslogtreecommitdiffstats
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 60075f254..c640565e2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -5894,6 +5894,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
Shfunc shcopy = (Shfunc)zhalloc(sizeof(struct shfunc));
memcpy(shcopy, shfunc, sizeof(struct shfunc));
shcopy->node.nam = dupstring(shfunc->node.nam);
+ shcopy->filename = dupstring(shfunc->filename);
shfunc = shcopy;
name = shfunc->node.nam;
}