summaryrefslogtreecommitdiffstats
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/exec.c b/Src/exec.c
index d06821e76..bc9edce2c 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3249,7 +3249,7 @@ doshfunc(char *name, Eprog prog, LinkList doshargs, int flags, int noreturnval)
{
char **tab, **x, *oargv0;
int oldzoptind, oldlastval, oldoptcind;
- char saveopts[OPT_SIZE], *oldscriptname = NULL, *fname = dupstring(name);
+ char saveopts[OPT_SIZE], *oldscriptname = scriptname, *fname = dupstring(name);
int obreaks;
struct funcstack fstack;