diff options
| author | Quentin Carbonneaux | 2015-03-04 18:45:38 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2015-03-04 18:45:38 -0500 |
| commit | d90dd7d7d862e842df03ea0f943422cdf0a48e3e (patch) | |
| tree | 154f8fece34d365e0cfdc0852e55427ec6406f9e | |
| parent | dedc9f5d9228719c36405d74cc65ab545a1eecff (diff) | |
close states before processing them
| -rw-r--r-- | miniyacc.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -355,8 +355,6 @@ stadd(Item **pi) for (n=0; n<i->nt; n++) chg |= tsunion(&i1->ts[n].lk, &i->ts[n].lk); *pi = i1; - if (chg) - iclose(i1); return chg; } else { st = realloc(st, ++nst * sizeof st[0]); @@ -366,7 +364,6 @@ stadd(Item **pi) i->gtbl = yalloc(nsy, sizeof i->gtbl[0]); st[hi] = yalloc(1, sizeof *i1); *st[hi] = *i; - iclose(st[hi]); return 1; } } @@ -394,6 +391,7 @@ stgen() chg = 0; for (n=0; n<nst; n++) { i = st[n]; + iclose(i); for (s=0; s<nsy; s++) { igoto(i, s); i1 = &i0; |
