mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
skeletons: beware not to use yyarg when it's null
Reported by Adrian Vogelsgesang. * data/skeletons/glr.c, data/skeletons/lalr1.cc, * data/skeletons/lalr1.java, data/skeletons/yacc.c: Here.
This commit is contained in:
@@ -1458,7 +1458,8 @@ b4_dollar_popdef])[]dnl
|
||||
|
||||
if (!yyctx.lookahead ().empty ())
|
||||
{
|
||||
yyarg[0] = yyctx.token ();
|
||||
if (yyarg)
|
||||
yyarg[0] = yyctx.token ();
|
||||
int yyn = yyctx.yyexpected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
|
||||
return yyn + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user