mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
* src/getargs.c (flags_argmatch): Don't cause segmentation fault for
empty subargument list. For example: `bison --warnings= parser.y'.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* src/getargs.c (flags_argmatch): Don't cause segmentation fault for
|
||||||
|
empty subargument list. For example: `bison --warnings= parser.y'.
|
||||||
|
|
||||||
2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
|
2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
* data/push.c, data/yacc.c: Make sure there's a newline at the end of
|
* data/push.c, data/yacc.c: Make sure there's a newline at the end of
|
||||||
|
|||||||
@@ -91,15 +91,15 @@ flags_argmatch (const char *option,
|
|||||||
if (args)
|
if (args)
|
||||||
{
|
{
|
||||||
args = strtok (args, ",");
|
args = strtok (args, ",");
|
||||||
do
|
while (args)
|
||||||
{
|
{
|
||||||
int value = XARGMATCH (option, args, keys, values);
|
int value = XARGMATCH (option, args, keys, values);
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
else
|
else
|
||||||
*flags |= value;
|
*flags |= value;
|
||||||
|
args = strtok (NULL, ",");
|
||||||
}
|
}
|
||||||
while ((args = strtok (NULL, ",")));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*flags = ~0;
|
*flags = ~0;
|
||||||
|
|||||||
Reference in New Issue
Block a user