aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index a81cfb92..4644d198 100644
--- a/main.c
+++ b/main.c
@@ -116,6 +116,7 @@ void toy_init(struct toy_list *which, char *argv[])
if (toys.optargs != toys.argv+1) free(toys.optargs);
memset(&toys, 0, offsetof(struct toy_context, rebound));
+ if (toys.recursion > 1) memset(&this, 0, sizeof(this));
// Subset of init needed by singlemain.
toy_singleinit(which, argv);