]> git.saurik.com Git - bison.git/commitdiff
* src/closure.c (closure): Use nrules instead of playing tricks
authorAkim Demaille <akim@epita.fr>
Thu, 13 Dec 2001 11:02:04 +0000 (11:02 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 13 Dec 2001 11:02:04 +0000 (11:02 +0000)
with BITS_PER_WORD.

ChangeLog
src/closure.c

index 2e936b0a1c6ab6917ae05e3e078ab4b3779d06b4..b411c7e0cbb1b86b7ff04d59d52361959e02efb8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-13  Akim Demaille  <akim@epita.fr>
+
+       * src/closure.c (closure): Use nrules instead of playing tricks
+       with BITS_PER_WORD.
+
 2001-12-13  Akim Demaille  <akim@epita.fr>
 
        * src/print.c (print_actions): Output the handling of `$' as the
 2001-12-13  Akim Demaille  <akim@epita.fr>
 
        * src/print.c (print_actions): Output the handling of `$' as the
index 77ca72c8f1846880a6dd09aacdfa2fb4e567086c..12bb5817f36f340af9696e23dd06891c106a31d6 100644 (file)
@@ -220,7 +220,7 @@ closure (short *core, int n)
 
   nitemset = 0;
   c = 0;
 
   nitemset = 0;
   c = 0;
-  for (ruleno = 0; ruleno < rulesetsize * BITS_PER_WORD; ++ruleno)
+  for (ruleno = 0; ruleno < nrules + 1; ++ruleno)
     if (BITISSET (ruleset, ruleno))
       {
        int itemno = rule_table[ruleno].rhs;
     if (BITISSET (ruleset, ruleno))
       {
        int itemno = rule_table[ruleno].rhs;