diff options
| author | Quentin Carbonneaux | 2015-03-05 15:27:26 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2015-03-05 15:27:26 -0500 |
| commit | 6b619da0bf69bc50f67a64bd497c5fd00747ccaf (patch) | |
| tree | 5c24cf7c7c27e8f03c3c8b0e43243636d9cf4dce | |
| parent | 74b6607ffdbaae67f5bcb8182b40818648add4ec (diff) | |
have not tested in a while!
| -rw-r--r-- | miniyacc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -365,8 +365,9 @@ stadd(Item **pi) memmove(&st[hi+1], &st[hi], (nst-1 - hi) * sizeof st[0]); i->gtbl = yalloc(nsy, sizeof i->gtbl[0]); i->dirty = 1; - st[hi] = yalloc(1, sizeof *i1); - *st[hi] = *i; + i1 = yalloc(1, sizeof *i1); + *i1 = *i; + *pi = st[hi] = i1; return 1; } } |
