Skip to content

Commit e334a15

Browse files
author
Larry Wall
committed
perl 4.0 patch 36: (combined patch)
Since Ed Barton sent me a patch for the malignent form of "Malformed cmd links", I finally broke down and made a patch for the various other little things that have been accumulating on version 4.
1 parent 514dae0 commit e334a15

38 files changed

+12974
-26
lines changed

cons.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ CMD *cmd;
8585
Nullarg,mycompblock));
8686
saw_return = FALSE;
8787
cmd->c_flags |= CF_TERM;
88+
cmd->c_head = cmd;
8889
}
8990
sub->cmd = cmd;
9091
if (perldb) {
@@ -1353,7 +1354,8 @@ int willsave; /* willsave passes down the tree */
13531354

13541355
/* in any event, save the iterator */
13551356

1356-
(void)apush(tosave,cmd->c_short);
1357+
if (cmd->c_short) /* Better safe than sorry */
1358+
(void)apush(tosave,cmd->c_short);
13571359
}
13581360
shouldsave |= tmpsave;
13591361
}
@@ -1420,7 +1422,7 @@ int willsave;
14201422
shouldsave = TRUE;
14211423
break;
14221424
}
1423-
if (willsave)
1425+
if (willsave && arg->arg_ptr.arg_str)
14241426
(void)apush(tosave,arg->arg_ptr.arg_str);
14251427
return shouldsave;
14261428
}

0 commit comments

Comments
 (0)