mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
cex: fix a crash
* src/state-item.c (init_state_items): If the rule has no reductions at all, don't read at all in its list of reduced rules.
This commit is contained in:
@@ -150,7 +150,7 @@ init_state_items (void)
|
|||||||
state_item_set (sidx, s, s->items[j]);
|
state_item_set (sidx, s, s->items[j]);
|
||||||
state_item *si = state_items + sidx;
|
state_item *si = state_items + sidx;
|
||||||
const rule *r = item_rule (si->item);
|
const rule *r = item_rule (si->item);
|
||||||
if (red->rules[rule_search_idx] < r)
|
if (rule_search_idx < red->num && red->rules[rule_search_idx] < r)
|
||||||
++rule_search_idx;
|
++rule_search_idx;
|
||||||
if (rule_search_idx < red->num && r == red->rules[rule_search_idx])
|
if (rule_search_idx < red->num && r == red->rules[rule_search_idx])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user