summaryrefslogtreecommitdiff
path: root/awkgram.y
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-05-01 13:35:46 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-05-01 13:35:46 +0300
commitb232ef3a2ec89298148ff1802d6398365f2891da (patch)
tree6f82dce4cadb1de7ea63cc01615620e203a6e57a /awkgram.y
parent665ec924795675c32d7178613367ec9f7a7d08e1 (diff)
downloadgawk-b232ef3a2ec89298148ff1802d6398365f2891da.tar.gz
Fix minor coredump.
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 82283077..c7403200 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1195,9 +1195,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; }