mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +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:
@@ -1360,7 +1360,9 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx,
|
||||
{
|
||||
int yyn;]b4_lac_if([[
|
||||
YYDPRINTF ((stderr, "Constructing syntax error message\n"));]])[
|
||||
yyarg[yycount++] = yyctx->yytoken;
|
||||
if (yyarg)
|
||||
yyarg[yycount] = yyctx->yytoken;
|
||||
++yycount;
|
||||
yyn = yyexpected_tokens (yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1);
|
||||
if (yyn == YYNOMEM)
|
||||
return YYNOMEM;]b4_lac_if([[
|
||||
|
||||
Reference in New Issue
Block a user