Oops --- hadn't updated the nts array for the new child order.
authorDavid Given <dg@cowlark.com>
Tue, 4 Oct 2016 19:32:28 +0000 (21:32 +0200)
committerDavid Given <dg@cowlark.com>
Tue, 4 Oct 2016 19:32:28 +0000 (21:32 +0200)
util/mcgg/iburg.c

index af3106a..3eb703b 100644 (file)
@@ -779,9 +779,12 @@ static char* computents(Tree t, char* bp)
        if (t)
        {
                Nonterm p = t->op;
-               if (p->kind == NONTERM)
+               if (!t->left && !t->right)
                {
-                       sprintf(bp, "%s_%s_NT, ", prefix, p->name);
+                       if (p->kind == NONTERM)
+                               sprintf(bp, "%s_%s_NT, ", prefix, p->name);
+                       else
+                               sprintf(bp, "0, ");
                        bp += strlen(bp);
                }
                else