summaryrefslogtreecommitdiff
path: root/cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'cons.c')
-rw-r--r--cons.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cons.c b/cons.c
index 54fa14d880..8b1210d464 100644
--- a/cons.c
+++ b/cons.c
@@ -85,6 +85,7 @@ CMD *cmd;
Nullarg,mycompblock));
saw_return = FALSE;
cmd->c_flags |= CF_TERM;
+ cmd->c_head = cmd;
}
sub->cmd = cmd;
if (perldb) {
@@ -1353,7 +1354,8 @@ int willsave; /* willsave passes down the tree */
/* in any event, save the iterator */
- (void)apush(tosave,cmd->c_short);
+ if (cmd->c_short) /* Better safe than sorry */
+ (void)apush(tosave,cmd->c_short);
}
shouldsave |= tmpsave;
}
@@ -1420,7 +1422,7 @@ int willsave;
shouldsave = TRUE;
break;
}
- if (willsave)
+ if (willsave && arg->arg_ptr.arg_str)
(void)apush(tosave,arg->arg_ptr.arg_str);
return shouldsave;
}