aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y9
1 files changed, 6 insertions, 3 deletions
diff --git a/awkgram.y b/awkgram.y
index dde720cc..26f3823d 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1281,9 +1281,12 @@ param_list
}
| param_list comma NAME
{
- $3->param_count = $1->lasti->param_count + 1;
- $$ = list_append($1, $3);
- yyerrok;
+ if ($1 != NULL && $3 != NULL) {
+ $3->param_count = $1->lasti->param_count + 1;
+ $$ = list_append($1, $3);
+ yyerrok;
+ } else
+ $$ = NULL;
}
| error
{ $$ = NULL; }